aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkCanvasStateUtils.cpp
Commit message (Collapse)AuthorAge
* change canvas-state to just record clip boundsGravatar Mike Reed2018-03-21
| | | | | | | | | | | | This reflects the long-standing restrictions in our clients (webview) and the reality of the gpu target which just uses scissors. It also removes one of the few callers of canvas::clipRegion, which we'd like to remove. Bug: skia: Change-Id: Ie3b3c6e8752f82cddef256f753000f9da4bdbdee Reviewed-on: https://skia-review.googlesource.com/113260 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[6] "Remove SkDraw from device-draw methods, and enable device-centric ↵Gravatar Mike Reed2017-03-07
| | | | | | | | | | | | | | | | | clipping."""""" Previous failure was failure to detect that the clip wasn't wide-open when optimizing for retain-vs-discard in copy-on-write. gm:copy_on_write_retain detected this. Now fixed by adding new method to SkBaseDevice.h This reverts commit 27d07f0acb85eea4062075dfbe9148ce12d92c66. BUG=skia:6214 Change-Id: I532d16ec075a4525c2a550b1157bcec695dd8efd Reviewed-on: https://skia-review.googlesource.com/9341 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "Revert[2] "Remove SkDraw from device-draw methods, ↵Gravatar Mike Reed2017-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and enable device-centric clipping.""""" This reverts commit 025e2444c1f5a0c3cdc0bf60d1fa59941a0b5db4. Reason for revert: layouttest failures -- need to rebase these (tiny diffs in gradients) https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/6018/layout-test-results/results.html Original change's description: > Revert "Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."""" > > This reverts commit baf06bc89a0ee2ac4033281e7310f6c727faab79. > > Reason for revert: reland to diagnose possible g3 failure > > Original change's description: > > Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""" > > > > This reverts commit cfaa63237b152ae216f1351207bce3ea9808814c. > > > > Reason for revert: speculative revert to fix Google3 > > > > Original change's description: > > > Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."" > > > > > > passes new (augmented) CanvasClipType unittest > > > fixed rasterclipstack::setnewsize > > > > > > This reverts commit ea5e676a7b75600edcde3912886486004ccd7626. > > > > > > BUG=skia: > > > > > > Change-Id: I004653e0f4d01454662f8516fccab0046486f273 > > > Reviewed-on: https://skia-review.googlesource.com/9185 > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > Commit-Queue: Mike Reed <reed@google.com> > > > > > > > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org > > NOPRESUBMIT=true > > NOTREECHECKS=true > > NOTRY=true > > BUG=skia: > > > > Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea > > Reviewed-on: https://skia-review.googlesource.com/9230 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Cary Clark <caryclark@google.com> > > > > TBR=bsalomon@google.com,reviews@skia.org,caryclark@google.com,reed@google.com,mtklein@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Change-Id: I093fa8788056be39af01191bbf3a9e5de9f73954 > Reviewed-on: https://skia-review.googlesource.com/9244 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=mtklein@chromium.org,bsalomon@google.com,reviews@skia.org,caryclark@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I58f810a8ff241dbaf3133e2fe844548fcd0fa67a Reviewed-on: https://skia-review.googlesource.com/9245 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert[2] "Remove SkDraw from device-draw methods, and ↵Gravatar Mike Reed2017-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enable device-centric clipping."""" This reverts commit baf06bc89a0ee2ac4033281e7310f6c727faab79. Reason for revert: reland to diagnose possible g3 failure Original change's description: > Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""" > > This reverts commit cfaa63237b152ae216f1351207bce3ea9808814c. > > Reason for revert: speculative revert to fix Google3 > > Original change's description: > > Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."" > > > > passes new (augmented) CanvasClipType unittest > > fixed rasterclipstack::setnewsize > > > > This reverts commit ea5e676a7b75600edcde3912886486004ccd7626. > > > > BUG=skia: > > > > Change-Id: I004653e0f4d01454662f8516fccab0046486f273 > > Reviewed-on: https://skia-review.googlesource.com/9185 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > > > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea > Reviewed-on: https://skia-review.googlesource.com/9230 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> > TBR=bsalomon@google.com,reviews@skia.org,caryclark@google.com,reed@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I093fa8788056be39af01191bbf3a9e5de9f73954 Reviewed-on: https://skia-review.googlesource.com/9244 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable ↵Gravatar Cary Clark2017-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device-centric clipping.""" This reverts commit cfaa63237b152ae216f1351207bce3ea9808814c. Reason for revert: speculative revert to fix Google3 Original change's description: > Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."" > > passes new (augmented) CanvasClipType unittest > fixed rasterclipstack::setnewsize > > This reverts commit ea5e676a7b75600edcde3912886486004ccd7626. > > BUG=skia: > > Change-Id: I004653e0f4d01454662f8516fccab0046486f273 > Reviewed-on: https://skia-review.googlesource.com/9185 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea Reviewed-on: https://skia-review.googlesource.com/9230 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric ↵Gravatar Mike Reed2017-03-03
| | | | | | | | | | | | | | | | clipping."" passes new (augmented) CanvasClipType unittest fixed rasterclipstack::setnewsize This reverts commit ea5e676a7b75600edcde3912886486004ccd7626. BUG=skia: Change-Id: I004653e0f4d01454662f8516fccab0046486f273 Reviewed-on: https://skia-review.googlesource.com/9185 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Remove SkDraw from device-draw methods, and enable device-centric ↵Gravatar Mike Reed2017-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clipping." This reverts commit c77e33f73d3e86cfabf925d6f2e1166f81022575. Reason for revert: breaks isClipRect - this CL inspected the conservative clip for this, which is (by definition) a rect - probably need to query the device for this info Original change's description: > Remove SkDraw from device-draw methods, and enable device-centric clipping. > > BUG=skia:6214 > > Change-Id: I593900724310d09133ae4791ef68d38c43762fc2 > Reviewed-on: https://skia-review.googlesource.com/8806 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,halcanary@google.com,msarett@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6214 Change-Id: I9090cbbb9f45b2dd204d9fdc187de2ff714b93f6 Reviewed-on: https://skia-review.googlesource.com/9172 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove SkDraw from device-draw methods, and enable device-centric clipping.Gravatar Mike Reed2017-03-02
| | | | | | | | | BUG=skia:6214 Change-Id: I593900724310d09133ae4791ef68d38c43762fc2 Reviewed-on: https://skia-review.googlesource.com/8806 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* new hacky api to get cliprgn for androidGravatar Mike Reed2017-01-19
| | | | | | | | | BUG=skia: Change-Id: I42711a474906084adb3c888a599ae02505726484 Reviewed-on: https://skia-review.googlesource.com/7220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "move SkDevice.h and SkBitmapDevice.h contents in to src headers"Gravatar Mike Reed2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2f719a6b9214997e4cc24646d4b280038962b836. Reason for revert: <INSERT REASONING HERE> swf/transform/jsrunner/swiffy_canvas.h caller included SkDevice.h, but really wanted SkBitmap and SkColor Original change's description: > move SkDevice.h and SkBitmapDevice.h contents in to src headers > > BUG=skia: > > Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912 > Reviewed-on: https://skia-review.googlesource.com/7082 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bungeman@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I40f7f1e4ad62685facdd39492da7a0b105178221 Reviewed-on: https://skia-review.googlesource.com/7087 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* move SkDevice.h and SkBitmapDevice.h contents in to src headersGravatar Mike Reed2017-01-13
| | | | | | | | | BUG=skia: Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912 Reviewed-on: https://skia-review.googlesource.com/7082 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* change SkClipOp to a class enumGravatar Mike Reed2016-12-12
| | | | | | | | | BUG=skia: Change-Id: I25dbe6d6b8666a2a0a7be7bdd2ae0b067868d14e Reviewed-on: https://skia-review.googlesource.com/5718 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[2] "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"Gravatar Mike Reed2016-12-09
| | | | | | | | | | | This reverts commit a129dfef2aaab0b5995cdf1ab7b2cdd41c29cf72. BUG=skia: Change-Id: I717de6e5fcd4516aa684b014b1414b0f82ac2b91 Reviewed-on: https://skia-review.googlesource.com/5722 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* Revert "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"Gravatar Mike Reed2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8e7432b7f98dd592e529a0c8bb038d73ebfb0478. Reason for revert: <INSERT REASONING HERE> external/skia/bench/../tools/android/SkAndroidSDKCanvas.h:103:36: error: C++ requires a type specifier for all declarations void onClipRect(const SkRect&, ClipOp, ClipEdgeStyle) override; Original change's description: > remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS > > > switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone > > BUG=skia: > > Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d > Reviewed-on: https://skia-review.googlesource.com/5714 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: If26ea91d7464615e43c1d3d2f726e337ff56b55c Reviewed-on: https://skia-review.googlesource.com/5721 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* remove SK_SUPPORT_LEGACY_CLIP_REGIONOPSGravatar Mike Reed2016-12-08
| | | | | | | | | | | switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone BUG=skia: Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d Reviewed-on: https://skia-review.googlesource.com/5714 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* 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>
* change SkCanvasStack to take ownership of its subcanvasesGravatar Mike Reed2016-11-15
| | | | | | | | | | | Inspired by https://bugs.chromium.org/p/chromium/issues/detail?id=663959 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4799 Change-Id: I69f7ac73386bb7ca96778e2fec4cb2757b982a52 Reviewed-on: https://skia-review.googlesource.com/4799 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* 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>
* s/SkAutoTUnref/sk_sp/ in src/ part 1Gravatar Hal Canary2016-11-07
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4480 Change-Id: I7d3219b02ad5094785e1b7635a9482e69aadbc8c Reviewed-on: https://skia-review.googlesource.com/4480 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Remove SkAutoTDelete.Gravatar Ben Wagner2016-11-03
| | | | | | | | | Replace with std::unique_ptr. Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176 Reviewed-on: https://skia-review.googlesource.com/4381 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* remove SkErrorGravatar Mike Klein2016-10-13
| | | | | | | | | | | | | It has not caught on. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3321 Change-Id: Ib2ee4ef99bc89c8f4b7504e42a9d7d9dfc483015 Reviewed-on: https://skia-review.googlesource.com/3321 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* abstract name of clipping ops, to transtion to a more restricted setGravatar reed2016-09-20
| | | | | | | | | | | SkRegion::Op --> SkCanvas::ClipOp (alias) --> SkClipOp pre-CL needed in chrome : https://codereview.chromium.org/2355583002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355483002 Review-Url: https://codereview.chromium.org/2355483002
* make LayerIter private, and remove skipClip optionGravatar reed2016-08-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257203002 Review-Url: https://codereview.chromium.org/2257203002
* remove 'deprecated' region from SkDrawGravatar reed2016-04-27
| | | | | | | | | | | | | | | Most call-sites that used it just took its bounds, so it was trivial to convert them to get the bounds of the RasterClip. Two clients wanted the actual region: 1. layeriter for android 2. pdf Android already only has BW clips, so should be safe. PDF now overrides its clip methods to ensure that all clips are BW. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1925693002 Review URL: https://codereview.chromium.org/1925693002
* detach -> releaseGravatar mtklein2016-03-16
| | | | | | | | | | | | | The C++ standard library uses the name "release" for the operation we call "detach". Rewriting each "detach(" to "release(" brings us a step closer to using standard library types directly (e.g. std::unique_ptr instead of SkAutoTDelete). This was a fairly blind transformation. There may have been unintentional conversions in here, but it's probably for the best to have everything uniformly say "release". BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1809733002 Review URL: https://codereview.chromium.org/1809733002
* Hide SkCanvas::{set,get}DrawFilterGravatar fmalita2016-01-21
| | | | | | | | | | Except for Android, which still makes use of it. BUG=skia:3587 R=reed@google.com,djsollen@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1618843002 Review URL: https://codereview.chromium.org/1618843002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Begin kLegacyFontHost_InitType cleanupGravatar robertphillips2015-06-22
| | | | | | | | | | | | | | | | | | This CL starts the process of pushing kLegacyFontHost_InitType-type SkSurfaceProps up the call stack and out of Skia. It: Gets rid of the default SkBaseDevice ctor. This means everyone has to always hand an explicit SkSurfaceProps to it. It makes public the SkBitmapDevice creation methods that require SkSurfaceProps. Removes (in Skia's code base) all SkBitmapDevice ctor calls w/o SkSurfaceProps. Makes the "recording" canvases (e.g., pdf, svg, xps) explicitly not use kLegacyFontHost_InitType. Replicates the creating canvas/device's flags on saveLayer devices BUG=skia:3934 Review URL: https://codereview.chromium.org/1204433002
* don't use accessBitmapGravatar reed2015-05-26
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1154293002
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Run CanvasState test across a library boundary.Gravatar scroggo2014-07-22
| | | | | | | | | | | | | | | | | | | | | | | | Refactor CanvasStateTest to pull out functions which can either be called directly or from a shared library. Add a command line flag to pass in the path to a library to open to call those functions from. Separate different CanvasTest tests into separate DEF_TEST tests. This allows them to be run in parallel. Move the ifdefs outside of function declarations to skip running CanvasTest tests which do nothing. Add the canvas_state_lib target. It is a shared library that exports some functions to be called by another version of Skia. BUG=b/15693384 R=djsollen@google.com, reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/400043003
* 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
* Revert "Revert of add colortable support to imagegenerator ↵Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | | | | | | (https://codereview.chromium.org/304443003/)" Fix is to add colortable param to installPixels() This reverts commit 924205aaf2e0c3c65dda13e0eaccde3e7b2a5c40. BUG=skia: R=scroggo@google.com, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/300263005 git-svn-id: http://skia.googlecode.com/svn/trunk@14958 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/234243002/) Reason for revert: Want to reland the original CL. Original issue's description: > Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/) > > Reason for revert: > breaking the Chrome deps roll. > http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio > > Original issue's description: > > Rename kPMColor_SkColorType to kN32_SkColorType. > > > > The new name better represents what this flag means. > > > > BUG=skia:2384 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14117 > > TBR=reed@google.com,scroggo@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14144 R=reed@google.com, bensong@google.com TBR=bensong@google.com, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: scroggo@google.com Review URL: https://codereview.chromium.org/235523003 git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/227433009/) Reason for revert: Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now. Original issue's description: > Rename kPMColor_SkColorType to kN32_SkColorType. > > The new name better represents what this flag means. > > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14117 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/234833003 git-svn-id: http://skia.googlecode.com/svn/trunk@14149 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/234243002/) Reason for revert: fixes on the chrome side are landing (brettw), keep fingers crossed. Original issue's description: > Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/) > > Reason for revert: > breaking the Chrome deps roll. > http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio > > Original issue's description: > > Rename kPMColor_SkColorType to kN32_SkColorType. > > > > The new name better represents what this flag means. > > > > BUG=skia:2384 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14117 > > TBR=reed@google.com,scroggo@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14144 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/233813004 git-svn-id: http://skia.googlecode.com/svn/trunk@14145 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/227433009/) Reason for revert: breaking the Chrome deps roll. http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio Original issue's description: > Rename kPMColor_SkColorType to kN32_SkColorType. > > The new name better represents what this flag means. > > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14117 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/234243002 git-svn-id: http://skia.googlecode.com/svn/trunk@14144 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename kPMColor_SkColorType to kN32_SkColorType.Gravatar commit-bot@chromium.org2014-04-09
| | | | | | | | | | | | | The new name better represents what this flag means. BUG=skia:2384 R=reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/227433009 git-svn-id: http://skia.googlecode.com/svn/trunk@14117 2bbb7eff-a529-9590-31e7-b0007b416f81
* hide getTotalClip, so we can eventually remove it Gravatar commit-bot@chromium.org2014-03-08
| | | | | | | | | | | | | | hide getClipType, so we can eventually remove it patch from issue 189443007 TBR=robertphilips@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/189883010 git-svn-id: http://skia.googlecode.com/svn/trunk@13715 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SkColorType instead of SkBitmap::Config in views/effectsGravatar commit-bot@chromium.org2014-02-16
| | | | | | | | | | | R=scroggo@google.com, reed@google.com TBR=scroggo Author: reed@chromium.org Review URL: https://codereview.chromium.org/168843002 git-svn-id: http://skia.googlecode.com/svn/trunk@13469 2bbb7eff-a529-9590-31e7-b0007b416f81
* Store SkRRects in SkClipStackGravatar commit-bot@chromium.org2014-02-16
| | | | | | | | | | | BUG=skia:2181 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/163683002 git-svn-id: http://skia.googlecode.com/svn/trunk@13465 2bbb7eff-a529-9590-31e7-b0007b416f81
* Convert SkWriter32 to use an SkTDArray for its internal storage.Gravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | | | | | | | | | | | This reduces the allocation overhead of a null picture (create, beginRecording(), endRecording) from about 18K to about 1.9K. (There's still lots more to prune.) SkPictureFlat can exploit the fact that Writer32 is contiguous simplify its memory management. The Writer32 itself becomes the scratch buffer. Remove lots and lots of arbitrary magic numbers that were size guesses and minimum allocation sizes. Keep your eyes open for the big obvious DUH why we save 16K per picture! (Spoiler alert. It's because that first save we issue in beginRecording() forces the old SkWriter32 to allocate 16K.) Tests passing, DM passing. bench --match writer: ~20% faster null bench_record: ~30% faster bench_record on buildbot .skps: ~3-6% slower, ranging 25% faster to 20% slower bench_pictures on buildbot .skps: ~1-2% faster, ranging 13% faster to 28% slower BUG=skia:1850 R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/137433003 git-svn-id: http://skia.googlecode.com/svn/trunk@13073 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | | since it triggers a warning"" This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d. BUG= Review URL: https://codereview.chromium.org/54603004 git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it ↵Gravatar reed@google.com2013-10-31
| | | | | | | | triggers a warning" This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497. git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | a warning BUG= R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org Review URL: https://codereview.chromium.org/51033004 git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Second wave of Win64 warning cleanupGravatar robertphillips@google.com2013-10-15
| | | | | | | | https://codereview.chromium.org/27343002/ git-svn-id: http://skia.googlecode.com/svn/trunk@11778 2bbb7eff-a529-9590-31e7-b0007b416f81