aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPicture.cpp
Commit message (Collapse)AuthorAge
...
* O(1) SkPictureUtils::ApproxBytesUsed()Gravatar mtklein2015-04-21
| | | | | | | | | | Chrome wants to call this more often, and it's quite slow today. Seems like this could be clearer if SkPictureUtils::ApproxBytesUsed() were SkPicture::approxBytesUsed(). BUG=chromium:471873 Review URL: https://codereview.chromium.org/1090943004
* Send SkPicture deletion message lazily.Gravatar mtklein2015-04-07
| | | | | | | | | | | | | | | | | | If no one has read the picture's unique ID, there's no point invalidating it. This is the same trick we pull with SkPixelRefs. Before: 26M 1 1.49µs 1.6µs 1.77µs 6.25µs 42% picture_overhead_draw 13M 32 742ns 749ns 756ns 823ns 2% picture_overhead_nodraw After: 26M 1 1.27µs 1.33µs 1.49µs 5.51µs 45% picture_overhead_draw 14M 43 677ns 680ns 681ns 701ns 1% picture_overhead_nodraw BUG=skia: Review URL: https://codereview.chromium.org/1061283002
* Alter gpu vetoGravatar robertphillips2015-01-26
| | | | | | | | | | | | | | | | This CL unifies the treatment of the dashed and concave paths. Before: TP 28 FP 15 TN 8 FN 3 IND 3 After: TP 28 FP 18 TN 7 FN 2 IND 2 One of the TrueNegatives that became a FalsePositive was the motivation use case (the Chromium busy spinner). Committed: https://skia.googlesource.com/skia/+/87a6a8e18c7d5bbc94f478b44c53dc0e0549f927 Review URL: https://codereview.chromium.org/875913002
* Revert of Alter gpu veto (patchset #1 id:1 of ↵Gravatar robertphillips2015-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/875913002/) Reason for revert: Failing tests Original issue's description: > Alter gpu veto > > This CL unifies the treatment of the dashed and concave paths. > > Before: > TP 28 FP 15 TN 8 FN 3 IND 3 > > After: > TP 28 FP 18 TN 7 FN 2 IND 2 > > One of the TrueNegatives that became a FalsePositive was the motivation use case (the Chromium busy spinner). > > Committed: https://skia.googlesource.com/skia/+/87a6a8e18c7d5bbc94f478b44c53dc0e0549f927 TBR=egdaniel@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/879483003
* Alter gpu vetoGravatar robertphillips2015-01-26
| | | | | | | | | | | | | | This CL unifies the treatment of the dashed and concave paths. Before: TP 28 FP 15 TN 8 FN 3 IND 3 After: TP 28 FP 18 TN 7 FN 2 IND 2 One of the TrueNegatives that became a FalsePositive was the motivation use case (the Chromium busy spinner). Review URL: https://codereview.chromium.org/875913002
* Rename SkDrawPictureCallback to SkPicture::AbortCallbackGravatar robertphillips2015-01-07
| | | | | | Committed: https://skia.googlesource.com/skia/+/7ef197255deb4e2fa64c03c7130d56ddf164e83c Review URL: https://codereview.chromium.org/829983003
* Revert of Rename SkDrawPictureCallback to SkPicture::AbortCallback (patchset ↵Gravatar reed2015-01-06
| | | | | | | | | | | | | | | | | | #2 id:20001 of https://codereview.chromium.org/829983003/) Reason for revert: speculative revert to unblock DEPS roll Original issue's description: > Rename SkDrawPictureCallback to SkPicture::AbortCallback > > Committed: https://skia.googlesource.com/skia/+/7ef197255deb4e2fa64c03c7130d56ddf164e83c TBR=reed@google.com,robertphillips@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/824013004
* Rename SkDrawPictureCallback to SkPicture::AbortCallbackGravatar robertphillips2015-01-06
| | | | Review URL: https://codereview.chromium.org/829983003
* remove dead SK_LEGACY_ENCODE_BITMAP flagGravatar reed2014-12-20
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/820903002
* fix SK_LEGACY_ENCODE_BITMAP missing castGravatar reed2014-12-19
| | | | | | | | | BUG=skia: TBR= NOTRY=True NOTREECHECKS=True Review URL: https://codereview.chromium.org/815223002
* add const to encodePixels pixel parameterGravatar reed2014-12-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/788143007
* Replace EncodeBitmap with an interface.Gravatar scroggo2014-12-11
| | | | | | | | | | | | | | Gives more flexibility to the caller to decide whether to use the encoded data returned by refEncodedData(). Provides an implementation that supports the old version of SkPicture::serialize(). TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely BUG=skia:3190 Review URL: https://codereview.chromium.org/784643002
* Revert of Replace EncodeBitmap with an interface. (patchset #12 id:210001 of ↵Gravatar scroggo2014-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/784643002/) Reason for revert: Failing serialization tasks in DM: http://build.chromium.org/p/client.skia/builders/Test-Win8-ShuttleA-GTX660-x86-Debug/builds/352/steps/dm/logs/stdio Original issue's description: > Replace EncodeBitmap with an interface. > > Gives more flexibility to the caller to decide whether to use the > encoded data returned by refEncodedData(). > > Provides an implementation that supports the old version of > SkPicture::serialize(). > > TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely > > BUG=skia:3190 > > Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1 > > Committed: https://skia.googlesource.com/skia/+/02b217f80b01a7dda8493422e5257c36a9ce8464 TBR=reed@google.com,rmistry@google.com NOTREECHECKS=true NOTRY=true BUG=skia:3190 Review URL: https://codereview.chromium.org/783393004
* Replace EncodeBitmap with an interface.Gravatar scroggo2014-12-09
| | | | | | | | | | | | | | | | Gives more flexibility to the caller to decide whether to use the encoded data returned by refEncodedData(). Provides an implementation that supports the old version of SkPicture::serialize(). TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely BUG=skia:3190 Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1 Review URL: https://codereview.chromium.org/784643002
* Revert of Replace EncodeBitmap with an interface. (patchset #11 id:190001 of ↵Gravatar robertphillips2014-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/784643002/) Reason for revert: Compilation is failing on some bots Original issue's description: > Replace EncodeBitmap with an interface. > > Gives more flexibility to the caller to decide whether to use the > encoded data returned by refEncodedData(). > > Provides an implementation that supports the old version of > SkPicture::serialize(). > > TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely > > BUG=skia:3190 > > Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1 TBR=reed@google.com,scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:3190 Review URL: https://codereview.chromium.org/787833002
* Replace EncodeBitmap with an interface.Gravatar scroggo2014-12-09
| | | | | | | | | | | | | | Gives more flexibility to the caller to decide whether to use the encoded data returned by refEncodedData(). Provides an implementation that supports the old version of SkPicture::serialize(). TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely BUG=skia:3190 Review URL: https://codereview.chromium.org/784643002
* Bump min picture version.Gravatar mtklein2014-12-01
| | | | | | | | | | | | | Chrome Stable is M39, which produces picture format v35: https://chromium.googlesource.com/skia/+/chrome/m39/include/core/SkPicture.h We don't need any code to deal with pictures older than v35. (When M40 goes stable, we can step up to v37, the current latest version.) BUG=skia: Review URL: https://codereview.chromium.org/770703002
* option to return drawable from recordingGravatar reed2014-11-24
| | | | | | | | patch from issue 747033005 at patchset 80001 (http://crrev.com/747033005#ps80001) BUG=skia: Review URL: https://codereview.chromium.org/732653004
* Remove Picture deletion listeners.Gravatar mtklein2014-11-24
| | | | | | | | Looks like we can just have ~SkPicture put the message on the bus directly. BUG=skia:3144 Review URL: https://codereview.chromium.org/751663002
* SkPicture::SnapshotArray doesn't really stand to benefit from refcounting.Gravatar mtklein2014-11-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/748803005
* SkData -> SkPicture::SnapshotArrayGravatar mtklein2014-11-21
| | | | | | | | | | Restores type safety with all the same features. (Also note, less code: 29 insertions, 50 deletions.) BUG=skia: Review URL: https://codereview.chromium.org/746553002
* simplify uniqueID code in pictureGravatar reed2014-11-21
| | | | | | | | patch from issue 750003002 at patchset 1 (http://crrev.com/750003002#ps1) BUG=skia: Review URL: https://codereview.chromium.org/752573002
* Allow pictures to have a full boundsGravatar reed2014-11-19
| | | | | | | | This reverts commit 7c4cdd2c5b7b6c71fa0e7612594f7885f2dbf264. BUG=skia: Review URL: https://codereview.chromium.org/738083002
* Revert of allow pictures to have a full bounds (patchset #3 id:40001 of ↵Gravatar reed2014-11-19
| | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/736583004/) Reason for revert: needed to update legacy width() helpers Original issue's description: > allow pictures to have a full bounds > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/7e76bff26e7c74902841ca4f607eb0b24a833a4a TBR=fmalita@google.com,mtklein@google.com,robertphillips@google.com,fmalita@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/722043005
* allow pictures to have a full boundsGravatar reed2014-11-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/736583004
* wip for drawablesGravatar reed2014-11-18
| | | | | | | | | | | | Idea: 1. in its mutable recording state, keep a table of drawables on the side, and store an index in the record list. 2. In "immediate-mode" draw, just call the clients drawable directly (need access to our private list to turn the stored index into a proc) 3. when we "snap", we replace the list of drawables with a list of (sub) pictures, and then during playback of the snapped picture, we invoke a private drawable which just calls "drawPicture" on the index'd subpicture. Review URL: https://codereview.chromium.org/727363003
* More SkPicture cleanupGravatar mtklein2014-11-17
| | | | | | | | | | | | | | | | - move field declarations together and pack them a little tighter - get rid of fData - remove dead code in debugger, including unused SkPicturePlayback subclass There are now no more long-lived SkPictureData! (Really, there never were, but now we don't pretend to support them.) BUG=skia: No API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/725143002
* Change where layer hoisting data is gatheredGravatar robertphillips2014-11-11
| | | | | | | | | | | | This CL: 1) removes the EXPERIMENTAL_optimize on SkCanvas & SkDevice 2) moves the saveLayer gathering step to endRecording 3) Replaces GPUOptimize with SkRecordComputeLayers 4) Update bench_pictures & render_pictures to provide the new flag #2 also necessitated moving the BBH computation (and record optimization) out of SkPicture's ctor (and into endRecording) Review URL: https://codereview.chromium.org/718443002
* Enable distance field path rendering in Chrome.Gravatar jvanverth2014-11-04
| | | | | | | | | | - Add stat tracking for df-renderable paths - Modify GPU rasterization veto to account for df-renderable paths - Remove #define hiding df paths from Chromium and Android BUG=skia:2935 Review URL: https://codereview.chromium.org/685113003
* Shrink saveLayer device bounds when it supplies an explicit bounds and has a ↵Gravatar robertphillips2014-11-03
| | | | | | | | | | | | | | | | | | | | | | complex paint This CL shrinks the bound computed for saveLayers that possess both an explicit bound and a complex paint (e.g., one that affects transparent black). In this case the bound of the layer should be the clipped explicit bound rather then the clip prior/after the saveLayer/restore block. In the following the first bound is the currently computed bound while the second is the new/desired one: For a 100x100 picture saveLayer (no bound, no paint) [ 0 0 100 100 ] [ 50 50 100 100 ] setMatrix (translate 50, 50) [ 0 0 100 100 ] [ 50 50 100 100 ] saveLayer (bound of 0, 0, 50, 50 - complex paint) [ 0 0 100 100 ] [ 50 50 100 100 ] restore [ 0 0 100 100 ] [ 50 50 100 100 ] restore [ 0 0 100 100 ] [ 50 50 100 100 ] Review URL: https://codereview.chromium.org/696763002
* Remove DEPRECATED_beginRecording().Gravatar mtklein2014-10-01
| | | | | | | | | | | | | | | This removes: 1) ability to record old pictures with SkPictureRecorder; 2) a couple tests specific to the old backend. The functionality of DEPRECATED_beginRecording() now lives in (private) SkPicture::Backport(), which is the only place we need it now. BUG=skia: TBR=reed@google.com Review URL: https://codereview.chromium.org/618303002
* Strip old backend recording down to essentialsGravatar mtklein2014-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | Feature-wise, this removes: 1) BBH support; 2) peephole optimizations; 3) record-time text op specializations; 4) the guarantee that SkPaints are flattened. This deletes the optimizations GM, which only exists to test the peepholes of the old backend. SkRecord optimizations are unit tested, and if that ever fails we can think about adding another GM like this, but they're different enough we'd want to start from scratch anyway. We need to keep the code that plays back the specialized text ops around for a while for compatibility with existing .SKPs that have those ops recorded. BUG=skia: CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot R=robertphillips@google.com, reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/617953002
* Clean up SK_PICTURE_USE_SK_RECORD and SK_PICTURE_OPTIMIZE_SK_RECORD.Gravatar mtklein2014-09-30
| | | | | | | | | | | | | | | | | This folds the code through as if they were defined, which is the explicit state in both our build and Chrome's. This leaves the EXPERIMENTAL_ and DEPRECATED_ hooks in to be cleaned up or privatized later. CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot BUG=skia: R=reed@google.com, robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/616033002
* Remove support for SkPicture::clone().Gravatar mtklein2014-09-30
| | | | | | | | | | | | | | | | This folds SK_SUPPORT_LEGACY_PICTURE_CLONE through as undefined. Chrome's not used clone() for a month or two, and we don't use it ourselves. Don't think Android ever did. CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot BUG=skia: R=reed@google.com, mtklein@google.com, robertphillips@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/620533002
* SkPicture::PathCounter is O(N^2) for pictures nested N deep. Fix that.Gravatar mtklein2014-09-15
| | | | | | | | | | | We've already done the analysis for child pictures. Don't do it again. BUG=skia: R=fmalita@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/573833002
* Add flag to call SkRecordOptimize on new pictures.Gravatar mtklein2014-09-15
| | | | | | | | | | | As usual it's enabled by default in the Skia tree. Will flip in Chrome after this rolls. BUG=skia: R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/573773002
* Delay any SkRecordOptimize until after SkRecord has stuck.Gravatar mtklein2014-09-10
| | | | | | | | | BUG=skia: R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/561993002
* Turn on the save-layer optimization.Gravatar mtklein2014-09-08
| | | | | | | | | BUG=skia: R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/551853002
* Turn on all pixel-perfect SkRecord optimizations.Gravatar mtklein2014-09-08
| | | | | | | | | BUG=skia: R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/550083006
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Change SkPicture::draw to playbackGravatar robertphillips2014-09-04
| | | | | | | | R=reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/540963002
* Remove use of EXPERIMENTAL_getActiveOps from layer hoisting codeGravatar robertphillips2014-09-03
| | | | | | | | | | This is getting in the way of switching to the SkRecord backend and is of questionable value. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/539693002
* Remove legacy (and also broken) SkPicture constructor.Gravatar djsollen2014-09-02
| | | | | | | | R=robertphillips@google.com, reed@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/532703004
* Try out scalar picture sizesGravatar robertphillips2014-08-29
| | | | | | | | | | This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect. R=reed@google.com, mtklein@google.com, fmalita@google.com, fmalita@chromium.org Author: robertphillips@google.com Review URL: https://codereview.chromium.org/513983002
* Convert BBH APIs to use SkRect.Gravatar mtklein2014-08-27
| | | | | | | | | | | | | Still TODO: convert internals of SkTileGrid.cpp and SkRTree.cpp to work in floats too. NOTREECHECKS=true BUG=skia:1021 R=robertphillips@google.com, reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/511613002
* Revert of Revert back to SkPictureData pictures. Huge perf regression. ↵Gravatar mtklein2014-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #1 of https://codereview.chromium.org/496603002/) Reason for revert: Try again now that we have --bbh on nanobench and it's looking decent. Original issue's description: > Revert back to SkPictureData pictures. Huge perf regression. > > http://skiaperf.com/#108 > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4082d290eea2f70caa82120ff3bc4fbdccbf206c R=reed@google.com, mtklein@chromium.org TBR=mtklein@chromium.org, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: mtklein@google.com Review URL: https://codereview.chromium.org/496173002
* Install a hook to swap between SkPicture backends with a single define.Gravatar mtklein2014-08-21
| | | | | | | | | BUG=skia: R=robertphillips@google.com, reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/492023002
* Our SkPicture::Analysis visitors should recurse into nested pictures.Gravatar mtklein2014-08-21
| | | | | | | | | BUG=skia: R=tomhudson@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/495793002
* Revert back to SkPictureData pictures. Huge perf regression.Gravatar mtklein2014-08-20
| | | | | | | | | | | http://skiaperf.com/#108 BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/496603002
* Always read .skp files and other serialized pictures into SkRecord.Gravatar mtklein2014-08-20
| | | | | | | | | | | | | | | | This should switch all our internal tools that aren't clever about it over to SkRecord pictures. (The clever tools know what they're doing.) Also, deletes the old SkPicture::clone() path. return this or die. BUG=skia: Committed: https://skia.googlesource.com/skia/+/7b705bb17e09508e3761b54f59833b1ceb4ce9a6 R=robertphillips@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/481743003