aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPictureUtils.cpp
Commit message (Collapse)AuthorAge
* Rename GrAccelData to SkLayerInfo and move it to src/coreGravatar robertphillips2014-11-12
| | | | Review URL: https://codereview.chromium.org/719133002
* Move SkRecordComputeLayers and CollectLayers into SkRecordDraw.cppGravatar robertphillips2014-11-12
| | | | | | Rather then exposing parts of FillBounds (as in Expose FillBounds to allow GrPictureUtils::CollectLayers to be layered on top of it - https://codereview.chromium.org/698643002/), this CL moves CollectLayers into SkRecordDraw.cpp to accomplish the layering. Review URL: https://codereview.chromium.org/716913003
* 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
* Small refactoring of layer discovery codeGravatar robertphillips2014-11-10
| | | | | | This CL removes CollectLayers' reliance on having the top most picture (by removing the unused fPictureID member). This then allows making CollectLayers' API closer to that of SkRecordFillBounds in order to facilitate using them interchangeably. Review URL: https://codereview.chromium.org/714533002
* Upgrade GPUOptimizeGravatar robertphillips2014-10-30
| | | | | | | | | | | | This will be a bit hairy to review. The FillBounds and CollectLayers code has diverged significantly resulting in the rendering path seeing different bounds than the hoisting path. This CL merges the FillBounds changes into CollectLayers. A follow on CL will, hopefully, find a way to layer CollectLayers on top of FillBounds. The only code in CollectLayers that is different from FillBounds is bracketed by "LAYER HOISTING" comments. NOTREECHECKS=true Review URL: https://codereview.chromium.org/685263004
* Alter layer hoisting to only hoist layers for one canvas at a timeGravatar robertphillips2014-10-28
| | | | | | | | | | This CL alters layer hoisting to defer creation of the free floating layers until they are actually needed (rather than creating _all_ the hoisted layers at the start). It also fixes a pre vs. post Concat bug with how matrices were being accumulated. BUG=skia:2315 Review URL: https://codereview.chromium.org/657383004
* Track nested picture xform state for layer hoistingGravatar robertphillips2014-10-22
| | | | | | The accumulated matrix state of any enclosing SkPictures must be stored separate from the picture-local CTM. Any setMatrix calls inside a layer need to replace the picture-local CTM but concatenate with the enclosing SkPicture transform state (and the transform state needed to translate the layer to the correct location in the cached GrTexture). Review URL: https://codereview.chromium.org/639863005
* Add clip to layer cacheGravatar robertphillips2014-10-20
| | | | | | | | | | | This CL adds the clip region to the GPU layer hoisting image cache. It also switches back to the old caching behavior of using the entire CTM in the cache key rather then just the upper 2x2. This latter change is to focus more on hoisting rather then caching. It also includes 2 smaller fixes: a) layer's that have an image filter are no longer atlased (b.c. doing so complicates applying the image filter) b) the result of clipping the layer's bounds to the current clip is used as the hoisted layer's size. This reduces the amount of pixels drawn to match a normal (non-hoisted) draw pass. Review URL: https://codereview.chromium.org/640773004
* Remove unused SaveLayerInfo::fValid fieldGravatar robertphillips2014-10-09
| | | | | | Minor code cleanup Review URL: https://codereview.chromium.org/643713002
* Allow previously-hoisted layers to be reused in the same drawGravatar robertphillips2014-09-30
| | | | | | | | | | | | | In the Sierpinkski test case there are only a few layers appear in the "to be drawn" lists but they those layers get reused a lot of times with different transforms. This CL adds an additional category to allow such layers to be placed in the GrReplacements object without needing to be rendered. This is split out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/) BUG=skia:2315 R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/616023002
* Update layer hoisting code to correctly render sub-picture layersGravatar robertphillips2014-09-24
| | | | | | | | | | | The prior code assumed all layers came from a single picture. BUG=skia:2315 R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/595543002
* Fix bug in layer hoisting transition to SkRecord backendGravatar robertphillips2014-09-16
| | | | | | | | | | Care must be taken when setting up the initial CTM matrix for partial SkRecord playbacks b.c. all the setMatrix calls will concatenate with the initial matrix (which may be different then the CTM that is required to draw correctly). R=mtklein@google.com, bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/549143003
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* 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
* Switch GPU Optimization code to SkRecordGravatar robertphillips2014-08-27
| | | | | | | | R=mtklein@google.com, bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/504393002
* Rename GPUAccelData to GrAccelDataGravatar robertphillips2014-08-18
| | | | | | | | | | | This is calved off of (Add new API to allow layer hoisting/atlasing across picture piles - https://codereview.chromium.org/474623002/) R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/482773002
* add drawPicture variant that takes a matrix and paintGravatar reed2014-08-09
| | | | | | | | | | will need some staging strategy, since chrome and blink have overrides of onDrawPicture R=robertphillips@google.com, fmalita@google.com, bsalomon@google.com, mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/448793004
* Split SkPicturePlayback out of SkPictureDataGravatar robertphillips2014-07-07
| | | | | | | | | | | | | | | | | | | This splits the playback functionality out of SkPictureData. The old SkPictureData::draw method is pulled out along with its supporting functions as verbatim as possible. Some follow on CLs will be required to: re-enable profiling in the debugger (and remove the vestiges of SkTimedPicture) re-enable display of command offsets in the picture (this should probably wait until we've switched to SkRecord though) Clean up CachedOperationList (maybe fuse with SkPicture::OperationList) Split SkPicturePlayback into a base class and two derived classes Implement parallel version of GatherGPUInfo for SkRecord Landing this is blocked on removing Android's use of the abortPlayback entry point. R=mtklein@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/377623002
* Rename SkPicturePlayback to SkPictureDataGravatar robertphillips2014-07-01
| | | | | | | | | | This is in preparation for splitting the playback portion of the new SkPictureData class into a new SkPicturePlayback class. R=reed@google.com, mtklein@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/362773002
* Enable basic drawing with SkRecord-based pictures.Gravatar Mike Klein2014-06-23
| | | | | | | | | | | | | | | | | I've tagged all the functions in SkPicture.cpp is // fRecord TODO or // fRecord OK, depending on whether or not they're totally broken when used from an SkRecord-based picture. Obviously next steps are to eliminate all the TODOs, then clean up the notes. I converted SkPicture over to smart pointers too. It's particularly helpful that the smart pointers initialize to NULL by default. For now I've got all the SkRecord-based code jammed in at the bottom of the file. I figure it'll help me keep things straight for a bit, then we can rearrange later. BUG=skia: R=robertphillips@google.com Review URL: https://codereview.chromium.org/333823007
* hide virtuals on device for width/height/isopaqueGravatar reed2014-06-14
| | | | | | | | | R=bsalomon@google.com NOTREECHECKS=True Author: reed@chromium.org Review URL: https://codereview.chromium.org/334993002
* remove SK_SUPPORT_LEGACY_DEVICE_CONFIG codeGravatar reed2014-06-11
| | | | | | | | | BUG=skia: R=djsollen@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/327263002
* Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer)Gravatar robertphillips2014-06-04
| | | | | | | | R=reed@google.com, bsalomon@google.com, mtklein@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/313613004
* hide SkDevice::config()Gravatar reed2014-06-02
| | | | | | | | TBR=robertphilips Author: reed@chromium.org Review URL: https://codereview.chromium.org/302253002
* Revert "Revert of setConfig -> setInfo ↵Gravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | | | (https://codereview.chromium.org/308683005/)" This reverts commit eecaea4148805834f223681f70b6488ceba12d09. R=robertphillips@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/301283003 git-svn-id: http://skia.googlecode.com/svn/trunk@14989 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: broke all Windows bots Original issue's description: > setConfig -> setInfo > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14978 R=robertphillips@google.com, reed@google.com TBR=reed@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: epoger@google.com Review URL: https://codereview.chromium.org/302053002 git-svn-id: http://skia.googlecode.com/svn/trunk@14979 2bbb7eff-a529-9590-31e7-b0007b416f81
* setConfig -> setInfoGravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | BUG=skia: R=robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/308683005 git-svn-id: http://skia.googlecode.com/svn/trunk@14978 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix rendering artifacts in pull-saveLayers-forward modeGravatar commit-bot@chromium.org2014-05-08
| | | | | | | | | | | | | | | | | | | | This CL fixes 2 bugs in the pre-rendering of saveLayers: 1) The drawBitmapRect call wasn't occurring in device space so could sometimes be double transformed 2) The BBH op skipping in SkPicturePlayback could sometimes mess up the SkPictureStateTree's state It also reduces the number of layers that are pre-rendered when a BBH is not in use. Committed: http://code.google.com/p/skia/source/detail?r=14650 R=bsalomon@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/267293007 git-svn-id: http://skia.googlecode.com/svn/trunk@14659 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r14650 (Fix rendering artifacts in pull-saveLayers-forward mode - ↵Gravatar robertphillips@google.com2014-05-08
| | | | | | https://codereview.chromium.org/267293007) due to unit test failures git-svn-id: http://skia.googlecode.com/svn/trunk@14654 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix rendering artifacts in pull-saveLayers-forward modeGravatar commit-bot@chromium.org2014-05-08
| | | | | | | | | | | | | | | | | | This CL fixes 2 bugs in the pre-rendering of saveLayers: 1) The drawBitmapRect call wasn't occurring in device space so could sometimes be double transformed 2) The BBH op skipping in SkPicturePlayback could sometimes mess up the SkPictureStateTree's state It also reduces the number of layers that are pre-rendered when a BBH is not in use. R=bsalomon@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/267293007 git-svn-id: http://skia.googlecode.com/svn/trunk@14650 2bbb7eff-a529-9590-31e7-b0007b416f81
* First pass at pre-rendering saveLayers for GPUGravatar robertphillips@google.com2014-05-07
| | | | | | | | https://codereview.chromium.org/261663003/ git-svn-id: http://skia.googlecode.com/svn/trunk@14632 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-05-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14605 2bbb7eff-a529-9590-31e7-b0007b416f81
* Infrastructure changes to support pull-saveLayers-forward taskGravatar commit-bot@chromium.org2014-05-06
| | | | | | | | | | | | | | | | | | | | | This is split out of (First pass at pre-rendering saveLayers for GPU - https://codereview.chromium.org/261663003/). It mainly: Moves NeedsDeepCopy to somewhere more accessible (so GrPictureUtils.cpp can use it) Moves ComputeAccelDataKey somewhere more accessible (so GPUPicture test can use it) Adds unit test for picture saveLayer analysis (done in EXPERIMENTAL_optimize) Adds new fields to SaveLayerInfo that are needed to pull forward layers Committed: http://code.google.com/p/skia/source/detail?r=14571 R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/266203003 git-svn-id: http://skia.googlecode.com/svn/trunk@14586 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r14571 (Infrastructure changes to support pull saveLayers forward ↵Gravatar robertphillips@google.com2014-05-05
| | | | | | task - https://codereview.chromium.org/266203003) due to breaking Android unit tests git-svn-id: http://skia.googlecode.com/svn/trunk@14578 2bbb7eff-a529-9590-31e7-b0007b416f81
* Infrastructure changes to support pull-saveLayers-forward taskGravatar commit-bot@chromium.org2014-05-05
| | | | | | | | | | | | | | | | | | | This is split out of (First pass at pre-rendering saveLayers for GPU - https://codereview.chromium.org/261663003/). It mainly: Moves NeedsDeepCopy to somewhere more accessible (so GrPictureUtils.cpp can use it) Moves ComputeAccelDataKey somewhere more accessible (so GPUPicture test can use it) Adds unit test for picture saveLayer analysis (done in EXPERIMENTAL_optimize) Adds new fields to SaveLayerInfo that are needed to pull forward layers R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/266203003 git-svn-id: http://skia.googlecode.com/svn/trunk@14571 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-04-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14002 2bbb7eff-a529-9590-31e7-b0007b416f81
* Actually identify required saveLayers in SkGpuDevice::EXPERIMENTAL_drawPictureGravatar commit-bot@chromium.org2014-03-31
NOTRY=true R=bsalomon@google.com, rmistry@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/212933002 git-svn-id: http://skia.googlecode.com/svn/trunk@13993 2bbb7eff-a529-9590-31e7-b0007b416f81