aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils/SkCanvasStateUtils.h
Commit message (Collapse)AuthorAge
* no need for SK_SUPPORT_LEGACY_CANVAS_IS_REFCNT anymoreGravatar Mike Reed2016-12-07
| | | | | | | | | BUG=skia: Change-Id: If0aa01beb8be9bd7d9a3a5b23c795223b02f02d3 Reviewed-on: https://skia-review.googlesource.com/5690 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert[2] "Change SkCanvas to *not* inherit from SkRefCnt"Gravatar Mike Reed2016-11-13
| | | | | | | | | | | | | | | | | Changes over original: - conditionalize ownership in SkPictureRecorder - conditionalize ownership in SkCanvasStateUtils This reverts commit b613c266df48cf45296ecc23d1bd7098c84bb7ba. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4742 Change-Id: Ib25514d6f546c69b6650b5c957403b04f7380dc2 Reviewed-on: https://skia-review.googlesource.com/4742 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Change SkCanvas to *not* inherit from SkRefCnt"Gravatar Heather Miller2016-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 824075071885b6b741c141cbe2134d8345d34589. Reason for revert: Breaking WebView (chromium:663959) Original change's description: > Change SkCanvas to *not* inherit from SkRefCnt > > Definitely tricky for classes like SkNWayCanvas, where the caller (today) > need not pay attention to ownership of the canvases it gave the NWay > (after this CL, the caller *must* managed ownership) > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4441 > > DOCS_PREVIEW= https://skia.org/?cl=4441 > > Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081 > Reviewed-on: https://skia-review.googlesource.com/4441 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=djsollen@google.com,mtklein@google.com,halcanary@google.com,robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I5e3b3e876b7d2c09833cf841801321033b6b968b Reviewed-on: https://skia-review.googlesource.com/4687 Commit-Queue: Heather Miller <hcm@google.com> Reviewed-by: Heather Miller <hcm@google.com>
* Change SkCanvas to *not* inherit from SkRefCntGravatar Mike Reed2016-11-09
| | | | | | | | | | | | | | | | | | Definitely tricky for classes like SkNWayCanvas, where the caller (today) need not pay attention to ownership of the canvases it gave the NWay (after this CL, the caller *must* managed ownership) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4441 DOCS_PREVIEW= https://skia.org/?cl=4441 Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081 Reviewed-on: https://skia-review.googlesource.com/4441 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Turn SkCanvasStateUtils into a class with static functions.Gravatar tfarina2014-10-10
| | | | | | | | | | That simplifies the way to declare it a friend, as needed in SkCanvas. BUG=skia:2914 TEST=make most R=reed@google.com Review URL: https://codereview.chromium.org/645773002
* Change SkCanvasState to use inheritance.Gravatar scroggo2014-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Create a semi-stable API for capturing the state of an SkCanvas and ↵Gravatar djsollen@google.com2013-08-29
| | | | | | | | | | | | reconstructing that state across different versions of Skia. R=joth@chromium.org, mtklein@google.com, reed@google.com, scroggo@google.com Committed: https://code.google.com/p/skia/source/detail?r=11010 Review URL: https://codereview.chromium.org/23545017 git-svn-id: http://skia.googlecode.com/svn/trunk@11013 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Create a semi-stable API for capturing the state of an SkCanvas and ↵Gravatar djsollen@google.com2013-08-29
| | | | | | | | | | reconstructing that state across different versions of Skia." This reverts r11010. Review URL: https://codereview.chromium.org/23757008 git-svn-id: http://skia.googlecode.com/svn/trunk@11011 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create a semi-stable API for capturing the state of an SkCanvas and ↵Gravatar djsollen@google.com2013-08-29
reconstructing that state across different versions of Skia. R=joth@chromium.org, mtklein@google.com, reed@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/23545017 git-svn-id: http://skia.googlecode.com/svn/trunk@11010 2bbb7eff-a529-9590-31e7-b0007b416f81