Commit Graph

38 Commits

Author SHA1 Message Date
Benoit Jacob
3369ca8bb6 Bug 959380 - 2/5 - Make gfxImageFormat a typed enum - r=jrmuizel
find . -type f | grep -v \./obj | grep -v \.hg | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)gfxImageFormat\(ARGB32\|RGB24\|A8\|A1\|RGB16_565\|Unknown\)\($\|[^A-Za-z0-9_]\)/\1gfxImageFormat::\2\3/g'
2014-01-23 13:26:40 -05:00
Nicholas Cameron
93a47a9245 Bug 958363. Turn an error into a warning in gfxBlur. r=mattwoodrow 2014-01-21 10:46:27 +13:00
Benoit Jacob
55e7c24065 Bug 958375 - 4/9 - Make SurfaceFormat a typed enum - r=Bas
Specifically:
  r=Bas for manual changes
  f=Bas for automatic changes
See attachments on the bug for the specific breakdown.
2014-01-10 14:06:16 -05:00
Benoit Jacob
fdc0726361 Bug 944571 - Fix the non-unified build of gfxBlur.cpp - no review, trivial compilation fix 2013-11-30 21:21:03 -05:00
Matt Woodrow
527be3cbdd Bug 944571 - Part 1: Convert gfxAlphaBoxBlur to use Moz2D surfaces instead of Thebes. r=Bas 2013-10-02 17:20:47 +13:00
Matt Woodrow
80fd92fefb Bug 940845 - Part 5: Propogate the blur standard deviation up instead of the blur radius. r=roc 2013-11-26 12:09:04 +13:00
Matt Woodrow
c49de95f30 Bug 940845 - Part 4: Add BlurRectangle to gfxAlphaBoxBlur and use it. r=roc 2013-11-26 12:08:29 +13:00
Matt Woodrow
f5a56ec574 Bug 940845 - Part 1: Remove unused offset parameter from gfxAlphaBoxBlur. r=roc 2013-11-26 12:05:36 +13:00
Ehsan Akhgari
b6bef348c1 Bug 924221 - Minimize the #includes in gfx/thebes; r=bjacob
--HG--
extra : rebase_source : af198eb9b9739ce718ba0d16c385624a722cde51
2013-10-07 19:15:59 -04:00
Benoit Jacob
c1d7f88886 Bug 913872 - Take nested enums out of gfxASurface - 1/3 : automatic changes - r=jrmuizel
Generated by these regexes:

find . -name '*.h' -o -name '*.cpp' -o -name '*.mm' | grep -v '\.hg' | grep -v '^\.\/obj' | xargs sed -i 's/gfx[A-Za-z0-9_]*Surface\:\:[a-z]*\(\(ImageFormat\|SurfaceType\|ContentType\|MemoryLocation\)[0-9A-Za-z_]*\)/gfx\1/g'

find . -name '*.h' -o -name '*.cpp' -o -name '*.mm' | grep -v '\.hg' | grep -v '^\.\/obj' | xargs sed -i 's/gfx[A-Za-z0-9_]*Surface\:\:[a-z]*\(\(CONTENT_\|MEMORY_\)[0-9A-Za-z_]*\)/GFX_\1/g'

find . -name '*.h' -o -name '*.cpp' -o -name '*.mm' | grep -v '\.hg' | grep -v '^\.\/obj' | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)\(CONTENT_COLOR\|CONTENT_ALPHA\|CONTENT_COLOR_ALPHA\|CONTENT_SENTINEL\|MEMORY_IN_PROCESS_HEAP\|MEMORY_IN_PROCESS_NONHEAP\|MEMORY_OUT_OF_PROCESS\)\($\|[^A-Za-z0-9_]\)/\1GFX_\2\3/g'

find . -name '*.h' -o -name '*.cpp' -o -name '*.mm' | grep -v '\.hg' | grep -v '^\.\/obj' | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)\(ImageFormatARGB32\|ImageFormatRGB24\|ImageFormatA8\|ImageFormatA1\|ImageFormatRGB16_565\|ImageFormatUnknown\|SurfaceTypeImage\|SurfaceTypePDF\|SurfaceTypePS\|SurfaceTypeXlib\|SurfaceTypeXcb\|SurfaceTypeGlitz\|SurfaceTypeQuartz\|SurfaceTypeWin32\|SurfaceTypeBeOS\|SurfaceTypeDirectFB\|SurfaceTypeSVG\|SurfaceTypeOS2\|SurfaceTypeWin32Printing\|SurfaceTypeQuartzImage\|SurfaceTypeScript\|SurfaceTypeQPainter\|SurfaceTypeRecording\|SurfaceTypeVG\|SurfaceTypeGL\|SurfaceTypeDRM\|SurfaceTypeTee\|SurfaceTypeXML\|SurfaceTypeSkia\|SurfaceTypeSubsurface\|SurfaceTypeD2D\|SurfaceTypeMax\)\($\|[^A-Za-z0-9_]\)/\1gfx\2\3/g'
2013-09-24 16:45:13 -04:00
Milan Sreckovic
2662270c23 Bug 845125 - Add gfxImageSurface constructor that allocates more space than needed, change AlphaBoxBlur to not hold on to the data and let the callers manage it. r=jmuizelaar 2013-04-19 12:13:18 +02:00
Andrew Quartey
f55a37c1ba Bug 793201 - Fix compiler warnings in Azure with MSVC r=bas 2012-09-28 13:21:40 -04:00
Robert O'Callahan
7e36696064 Bug 792641. Clear mContext and mImageSurface to try to clean them up before we delete their underlying data buffer. r=jrmuizel
mBlur creates and owns an A8 data buffer that we pass to mImageSurface,
targeted by mContext.
Sometimes, when we remove the last reference to mContext cairo wants to
take a snapshot copy of the data buffer. If this happens after we've
deleted mBlur in ~gfxAlphaBoxBlur, we may crash due to the data
buffer having been deleted already.
A partial solution is to clear mContext and mImageSurface to force
those snapshots to be taken before deleting mBlur. This is only a
partial solution since in principle the client of gfxAlphaBoxBlur
may have kept mContext alive with its own reference. In practice
we don't do that though.
A complete solution would require making the data buffer be owned
by mImageSurface, either directly or indirectly.
2012-09-26 21:27:40 +12:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Bas Schouten
7bff374679 Bug 753835: Clip to mask image rather than relying on EXTEND_NONE. r=roc 2012-05-12 19:01:20 +02:00
Bas Schouten
f987b74374 Bug 715785: Make ImageContainers independent of LayerManagers. r=roc 2012-02-01 03:18:30 +01:00
Joe Drew
9faa8a6d27 Bug 685767 - Factor blurring out into its own class, and use it from gfxAlphaBoxBlur. r=mattwoodrow 2011-11-18 22:19:24 +13:00
Kyle Huey
053e18194b Back out Bug 685767 for leaking. 2011-11-17 13:01:11 -05:00
Joe Drew
890d07996d Bug 685767 - Factor blurring out into its own class, and use it from gfxAlphaBoxBlur. r=mattwoodrow 2011-11-14 17:29:28 +13:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Alon Zakai
e2ac733ae9 Bug 633627 - Fixedpoint division in blur code. r=jmuizelaar 2011-09-19 09:32:59 -07:00
Dominic Fandrey
0ab2f46136 Bug 645398 - Substitute PR_(MAX|MIN|ABS|ROUNDUP) macro calls; r=roc 2011-06-02 14:56:50 +02:00
Robert O'Callahan
d4c414cf18 Bug 641426. Part 8: Replace gfxRect::Outset/Inset with Inflate/Deflate. Also slip in a conversion constructor from nsIntRect to gfxRect. r=tnikkel 2011-04-19 15:07:51 +12:00
Robert O'Callahan
c957ae039e Bug 641426. Part 5: Avoid operator== where possible to distinguish between 'equal edges' and 'equal areas' for rectangles. r=dbaron,sr=cjones 2011-04-19 15:07:23 +12:00
Robert O'Callahan
8b71e83f60 Bug 641426. Part 2.5: Make gfxBlur bail out in all cases where the blur rect is empty. r=tnikkel 2011-04-19 15:07:21 +12:00
L. David Baron
efffd3fdc3 Remove unused (and unnecessarily slow) method gfxAlphaBoxBlur::PremultiplyAlpha. (Bug 633369) r=roc 2011-03-03 13:18:42 -08:00
Ms2ger
3ec44ade0c Bug 605179 - Fix build warnings in gfx/; r=roc a=bsmedberg
--HG--
extra : rebase_source : f9bd24d5f4bc6124b431ce22e6ac72bd218dc208
2010-12-05 18:38:12 +00:00
Oleg Romashin
3874b00931 Bug 607653 - avoid temporary fbos/textures on transformed layers, when possible. part1 r=roc a=apporval2.0 2010-11-24 11:35:21 +02:00
Justin Lebar
43b18d2b18 Backed out changeset a5ec817740f0. a=orange 2010-11-29 09:08:24 -08:00
Oleg Romashin
233ef8a80c Bug 607653 - avoid temporary fbos/textures on transformed layers, when possible. r=roc a=approval2.0 2010-11-24 11:35:21 +02:00
Dave Townsend
1244f0ae62 Backing out changeset 8fff1c186b30 from bug 607653 due to reftest failures on OSX. a=bustage 2010-11-24 16:19:41 -08:00
Oleg Romashin
a8abb4a458 Bug 607653 - avoid temporary fbos/textures on transformed layers, when possible. r=roc a=approval2.0 2010-11-24 11:35:21 +02:00
L. David Baron
b272e35a61 Change the blur radius for -moz-box-shadow and text-shadow to match what is specified in css3-background, and the blur radius for canvas to follow what is specified in HTML5. (Bug 590039) r=roc a2.0=blocking2.0:beta6
This fixes the multiplication by 1.5 in
gfxAlphaBoxBlur::CalculateBlurRadius (originally added in changeset
ce9f05b57b95 for bug 467518) to work correctly.  It was previously a
multiplication by 1 due to integer division.  CalculateBlurRadius
previously multiplied by 1.880; it now multiplies by 2.820.

This changes canvas shadow handling to multiply shadowBlur by 2 before
taking its square root, as described in the spec.  This means that
canvas shadow blurs 8px or smaller are 1.5 times larger than they were
previously (due to the CalculateBlurRadius change), and canvas shadow
blurs larger than 8px are 2.121 times larger than they were previously
(due to the CalculateBlurRadius change *and* the additional factor of
sqrt(2)).

This changes text-shadow and -moz-box-shadow handling to use
CalculateBlurRadius on half of the value given instead of passing the
value through directly.  This means that text-shadow and box-shadow
blurs are multiplied by 1.410 relative to their old sizes.  It also
means that we round rather than floor, so that the effect that used to
be drawn by a blur in the range 1px to 1.99px is now drawn by a blur
anywhere in the range 0.36px to 1.05px, the effect that used to be drawn
by a blur in the range 2px to 2.99px is now drawn by a blur anywhere in
the range 1.06px to 1.77px, what used to be a drawn by a blur in the
range 3px to 3.99px is now drawn by a blur anywhere in the range 1.78px
to 2.47px, etc.
2010-09-11 09:27:12 -07:00
Robert O'Callahan
79b8d06302 Bug 581222. Extend gfxAlphaBlur to support "spread radii". r=vlad
--HG--
extra : rebase_source : e644ae08007e52c524c3237d336441f1413f846b
2010-08-23 21:30:07 +12:00
Julian Seward
7a97356e18 Bug 582668 - gfxAlphaBoxBlur::Paint appears to pass garbage down through Cairo. r=roc 2010-08-15 11:01:49 +02:00
Zack Weinberg
29e6f9c217 Bug 571989 part 5: move gfx/src/thebes/utils/* to gfx/thebes. r=joedrew
--HG--
rename : gfx/src/thebes/utils/gfxBlur.cpp => gfx/thebes/gfxBlur.cpp
rename : gfx/src/thebes/utils/gfxBlur.h => gfx/thebes/gfxBlur.h
rename : gfx/src/thebes/utils/gfxThebesUtils.cpp => gfx/thebes/gfxThebesUtils.cpp
rename : gfx/src/thebes/utils/gfxThebesUtils.h => gfx/thebes/gfxThebesUtils.h
rename : gfx/src/thebes/utils/nsCoreAnimationSupport.h => gfx/thebes/nsCoreAnimationSupport.h
rename : gfx/src/thebes/utils/nsCoreAnimationSupport.mm => gfx/thebes/nsCoreAnimationSupport.mm
2010-07-13 14:54:21 -07:00