skia2/include/utils
scroggo 352c2181d1 Change SkCanvasState to use inheritance.
The base class, SkCanvasState, now holds the version, width, and
height. These fields will always be a necessary part of the class.
(Also add in some padding.)
The other fields, which may change, have been moved into the
subclass, SkCanvasState_v1. If/when the version changes, it will
correspond to a new subclass.
In SkCanvasStateUtils::CreateFromCanvasState, check the version on
the base class, then do a static_cast to the version corresponding
to SkCanvasState::version.

Remove CANVAS_STATE_VERSION, which is redundant with the version
specified by the subclass.

Use unambiguous type for rowBytes.

Build Android with SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG. This allows us
to run the full suite of CanvasState tests. It is also representative
of what will be used on Android by WebView.

Fix CanvasStateTest where it was broken inside ifdef'ed out code.

Use SkCanvas::getBaseLayerSize() instead of the deprecated
SkCanvas::getDeviceSize().

Update the comments in the header to be more clear. In particular,
an SkCanvasState can only be used to pass an SkCanvas' state to a
future version of Skia (or the same); not an older version.

NOTREECHECKS=true

BUG=b/15693384
R=reed@google.com, mtklein@google.com, djsollen@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/372003002
2014-07-15 12:34:26 -07:00
..
ios Drop executable flag from headers so that they can be packaged 2014-03-11 19:55:51 +00:00
mac expose CGImage -> SkBitmap 2014-04-22 20:24:33 +00:00
win Use lowercase windows.h in includes to fix Windows cross compilation using mingw. 2013-12-03 15:23:37 +00:00
SkBoundaryPatch.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkCamera.h remove SkScalarMul macro 2014-01-23 02:02:45 +00:00
SkCanvasStateUtils.h Change SkCanvasState to use inheritance. 2014-07-15 12:34:26 -07:00
SkCondVar.h Add thread safety configuration check. 2014-07-09 07:25:09 -07:00
SkCubicInterval.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkCullPoints.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkDebugUtils.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-02-15 07:16:57 +00:00
SkDeferredCanvas.h stop calling SkCanvas::getDevice 2014-06-30 09:05:34 -07:00
SkDumpCanvas.h SaveFlags be-gone 2014-06-30 10:13:28 -04:00
SkEventTracer.h rename tracing parameter to be more consistent with other methods 2014-02-03 19:47:13 +00:00
SkFrontBufferedStream.h Hide implementation details: SkFrontBufferedStream 2013-11-12 20:53:05 +00:00
SkInterpolator.h Promote SkInterpolator unit test to our tests driver. 2014-06-26 13:07:05 -07:00
SkJSONCPP.h In Android framework, make tools depend on jsoncpp 2014-06-18 10:31:40 -07:00
SkLayer.h Extended Inst counting to find "unknown" leaked object (SkTMaskGamma) 2012-08-16 14:58:06 +00:00
SkLua.h Add asADash to Lua for scraping 2014-05-14 16:03:14 +00:00
SkLuaCanvas.h SaveFlags be-gone 2014-06-30 10:13:28 -04:00
SkMatrix44.h Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
SkMeshUtils.h Start cleaning up 64bit Win warnings 2013-10-14 21:53:24 +00:00
SkNinePatch.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkNoSaveLayerCanvas.h Move SkNoSaveLayerCanvas.h to include/utils 2014-03-16 21:59:11 +00:00
SkNullCanvas.h Add SK_API to null canvas create method 2012-06-11 15:41:25 +00:00
SkNWayCanvas.h SaveFlags be-gone 2014-06-30 10:13:28 -04:00
SkParse.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkParsePaint.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkParsePath.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkPathUtils.h Animated the PathUtils Sample to show path contours# Enter a description of the change. 2013-07-09 16:30:38 +00:00
SkPictureUtils.h Split SkPicturePlayback out of SkPictureData 2014-07-07 13:46:35 -07:00
SkProxyCanvas.h SaveFlags be-gone 2014-06-30 10:13:28 -04:00
SkRandom.h remove SkScalarMul macro 2014-01-23 02:02:45 +00:00
SkRTConf.h fix leaks in SkConf 2014-01-31 17:32:03 +00:00
SkRunnable.h DM: make GPU tasks multithreaded again. Big refactor. 2014-02-28 20:31:31 +00:00
SkThreadPool.h eliminate mac xcode 5 only warning 2014-05-04 00:46:50 +00:00
SkWGL.h When performing offscreen rendering on windows, attempt to use a pbuffer context. 2014-07-01 07:20:11 -07:00