Commit Graph

176 Commits

Author SHA1 Message Date
Mason Chang
e3da2b3d0d Bug 1270640 - Part 1: Always enable normal hinting with skia unless we explicitly have grayscale aa. r=kats
--HG--
extra : rebase_source : 5a96292b0f7a98e60d052b31eb1d2cc35ea636ea
2016-05-09 12:34:00 -04:00
Lee Salzman
493ea699e5 Bug 1265131, part 3 - update Moz2d for Skia m51. r=jrmuizel 2016-04-28 22:55:27 -04:00
Mason Chang
3c536bb168 Bug 1267363. Disable hinting on osx fonts only if we have expclity grayscale AA. r=mstange 2016-04-26 13:14:15 -04:00
Lee Salzman
b5107c76f2 Bug 1267271 - skip empty surfaces in DrawTargetSkia::DrawSurfaceWithShadow. r=mchang 2016-04-25 15:42:13 -04:00
Mason Chang
68c6d918e5 Bug 1260454. Disable LCD font smoothing if we have grayscale AA on OS X. r=lsalzman 2016-04-21 08:45:14 -07:00
Lee Salzman
4bda990954 Bug 1257717 - throw InvalidStateError when CreatePattern fails to snapshot source. r=jrmuizel 2016-04-14 16:20:12 -04:00
Lee Salzman
c8c0ffc47d Bug 1264246 - verify that SkCanvas::getClipBounds succeeds before using result. r=mchang 2016-04-13 16:34:07 -04:00
Lee Salzman
36abf5b9cb bug 1263685 - Check if paint has a shader before modifying local matrix in DrawTargetSkia::MaskSurface. r=mchang 2016-04-11 22:16:57 -04:00
Lee Salzman
4c1b0ad4f8 Bug 1259621 - use AlphaBoxBlur in DrawTargetSkia::DrawSurfaceWithShadow. r=mchang 2016-03-25 22:14:50 -04:00
Lee Salzman
ca8c96a592 Bug 1252324 - add DrawTarget API for 3D transforms for use in layers. r=jrmuizel 2016-03-23 01:03:10 -04:00
Lee Salzman
7f2b998fc6 Bug 1257939 - initialize BGRX alpha channel to opaque when clearing and ignore uninitialized alpha in texture clients. r=mchang 2016-03-18 16:58:55 -04:00
Lee Salzman
2a69a5aa16 Bug 1250787 - ensure that subpixel text is disabled for Skia's Cairo font host so that font rendering matches our font metrics. r=mchang 2016-02-24 20:35:38 -05:00
Mason Chang
579a548e8f Bug 1249033 - Enable Subpixel AA Text on Skia for Dwrite and GDI Fonts. r=jrmuizel 2016-02-18 08:37:43 -08:00
Mason Chang
488e418aaa Backout 2c97c2a5dad7 bug 1249033. r=me 2016-02-17 13:19:56 -08:00
Mason Chang
5006e4e550 Bug 1249033 - Enable Subpixel AA Text on Skia for Dwrite and GDI Fonts. r=jrmuizel 2016-02-17 13:09:35 -08:00
Mason Chang
4ab8d2c595 Bug 1239152 Memset RGBX surfaces to opaque white. r=nical 2016-02-17 07:34:37 -08:00
Lee Salzman
9c09b93cc2 Bug 1246756 - part 1 - fix moz2d Skia usage for Skia m49 update. r=jrmuizel 2016-02-09 13:36:19 -05:00
Lee Salzman
c4f3bf16cc Bug 1244228 - fix DrawTargetSkia::OptimizeSourceSurface to still create Skia surfaces for GPU canvases even if creating a GPU surface failed. r=jmuizelaar 2016-02-03 13:49:36 -05:00
Lee Salzman
d913eb20b8 Bug 1240177 - part 3 - make DrawTargetSkia::OptimizeSourceSurface directly upload to GPU textures, r=jrmuizel 2016-01-21 09:52:08 -05:00
Lee Salzman
d67a7412a2 Bug 1240177 - part 2 - cleanups of DrawTargetSkia and SourceSurfaceSkia creation for GPU contexts, r=jrmuizel 2016-01-21 09:51:40 -05:00
Lee Salzman
a725c24151 Bug 1240177 - part 1 - add helper function to make Skia image info, r=jrmuizel 2016-01-21 09:50:43 -05:00
Lee Salzman
579717eec1 Bug 1241163 - Replace DrawTarget::CreateSourceSurfaceFromNativeSurface(CAIRO_CONTEXT) with Factory::CreateSourceSurfaceForCairoSurface. r=jrmuizel 2016-01-20 13:31:44 -05:00
Lee Salzman
466b5fb4c9 Bug 1239040 - Fix DrawTargetCairo/DrawTargetSkia LockBits and BorrowedXlibDrawable to work inside PushLayer. r=jrmuizel 2016-01-13 13:11:07 -05:00
Lee Salzman
f8a3f7243f Bug 1239040 - Cleanup of DrawTargetSkia CopySurface to avoid accessing bottom layer directly. r=jrmuizel 2016-01-13 13:11:07 -05:00
Lee Salzman
267c479fcf Bug 1239040 - Implement PushLayer for DrawTargetSkia. r=Bas 2016-01-12 23:30:33 -05:00
Lee Salzman
f348a7869e Bug 1239040 - Cleanup of DrawTargetSkia Mask and MaskSurface. r=jrmuizel 2016-01-12 13:26:31 -05:00
Lee Salzman
6000e65e29 Bug 1239040 - Cleanup of DrawTargetSkia GetBitmapForSurface to use installPixels. r=jrmuizel 2016-01-12 13:05:13 -05:00
Nicholas Nethercote
4b651d870f Bug 1231881 - Remove NativeSurfaceType::CAIRO_SURFACE. r=bas.
We have both NativeSurfaceType::CAIRO_CONTEXT and
NativeSurfaceType::CAIRO_SURFACE. They both refer to DrawTargets with Cairo
backends. The only reason for having both is so you can call GetNativeSurface()
and get either the |cairo_t*| or the underlying |cairo_surface_t*|.

I argue that this convenience confuses things more than it helps. This patch
removes CAIRO_SURFACE, and adds explicit cairo_get_target() calls where
necessary.

--HG--
extra : rebase_source : 6f1701a8131d854c7f623272182029847876754e
2016-01-05 14:24:08 -08:00
Mason Chang
2e3ff601d6 Bug 842894 - Support DirectWrite using the Skia backend. r=bas 2016-01-06 11:35:04 -08:00
Lee Salzman
5512fbeae7 Bug 1229983 - verify that paths are finite in DrawTargetSkia::Stroke/Fill to handle Canvas paths containing infs. r=jmuizelaar 2015-12-30 13:39:13 -05:00
Lee Salzman
f9d4573bec Bug 1082598 - Part 2: Fix Moz2D Skia usage for Skia update. r=jrmuizel 2015-12-18 13:53:25 -05:00
Wes Kocher
6ebc8a4b00 Backed out 10 changesets (bug 1082598) for 2d.path.arcTo.shape.curve1.html failures on OSX
Backed out changeset 018c2a3031f4 (bug 1082598)
Backed out changeset 8f60e42aca2e (bug 1082598)
Backed out changeset c4297c82165f (bug 1082598)
Backed out changeset c22c1bfd091a (bug 1082598)
Backed out changeset 8754fd718869 (bug 1082598)
Backed out changeset da976e4cd253 (bug 1082598)
Backed out changeset 3c8f87df8c68 (bug 1082598)
Backed out changeset 3183d30eb549 (bug 1082598)
Backed out changeset c239a7bc6cba (bug 1082598)
Backed out changeset aa3805015270 (bug 1082598)

--HG--
extra : commitid : LJSl0Bo8Hqr
2015-12-17 14:30:50 -08:00
Lee Salzman
6239163dbb Bug 1082598 - Part 2: Fix Moz2D Skia usage for Skia update. r=jrmuizel 2015-12-17 14:45:44 -05:00
Mason Chang
4cd6379278 Bug 1230357. Enable subpixel text on skia content backends. r=lsalzman 2015-12-16 12:43:49 -08:00
Milan Sreckovic
bf9a6ffcc5 Bug 1219494 - Part 2. gfx/2d and gfxCrash. r=milan
* * *
Bug 1219494: Part 3. gfx/thebes, gfx/src and gfxCrash
2015-11-26 08:38:00 +01:00
Lee Salzman
b8d98433fb Bug 1225977 - fix DrawTargetSkia::MaskSurface with non-zero offset. r=jmuizelaar 2015-11-19 10:25:15 -05:00
Mason Chang
e74c79f0e3 Bug 1221840. Support repeating images in 1 axis. r=seth 2015-11-23 08:17:35 -08:00
Lee Salzman
d75fbddd08 Bug 1223740 - enforce max surface size for DrawTargetSkia. r=bas 2015-11-19 13:35:31 -05:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Lee Salzman
dd33849286 Bug 998042 - 4-byte align Skia surfaces to interoperate with Cairo r=jrmuizel 2015-10-08 12:16:46 -04:00
Lee Salzman
3188abf696 Bug 1201272 - use a SkBlurImageFilter for Skia canvas shadows so we can better control composite operations. r=gwright
--HG--
extra : rebase_source : 3c9269cd9fa28f0b8f4c30c376f5a573e2851e7e
2015-09-04 15:29:11 -04:00
Lee Salzman
01cdb40ced Bug 1004489 - propagate Cairo font AA settings to Skia font. r=gw280 2015-09-02 14:12:32 -04:00
Lee Salzman
f15be30759 Bug 1188462 - Fix inclusion of skia headers to use correct directory prefixes. r=jrmuizel 2015-07-29 16:31:40 -04:00
Matt Woodrow
2d1a5c1f9d Bug 1034370 - Make sure we release the SkImageFilter in DrawTargetSkia::DrawSurfaceWithShadow. r=gw280 2015-07-29 16:35:55 -04:00
Wes Kocher
ec1078c65a Backed out 6 changesets (bug 1150944, bug 1034370) for build failures in WebGLContext.cpp CLOSED TREE
Backed out changeset e2a6160242e5 (bug 1150944)
Backed out changeset 1c510537d20b (bug 1150944)
Backed out changeset 7ae813666ed5 (bug 1150944)
Backed out changeset 2f29ac2e31cd (bug 1150944)
Backed out changeset bf7681b1567e (bug 1150944)
Backed out changeset 79c6b8d014d2 (bug 1034370)
2015-07-29 14:16:17 -07:00
Matt Woodrow
cd44f4ee9d Bug 1034370 - Make sure we release the SkImageFilter in DrawTargetSkia::DrawSurfaceWithShadow. r=gw280 2015-07-29 16:35:55 -04:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Nathan Froyd
974d8120f2 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Carsten "Tomcat" Book
6838712a26 Backed out changeset af2af798ad8f (bug 1165710) for OS X 10.6 crashes 2015-05-26 09:00:19 +02:00