aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPictureUtils.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-08-29 08:03:56 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-29 08:03:56 -0700
commita8d7f0b13cd4c6d773fcf055fe17db75d260fa05 (patch)
tree37e85b212ccd5761b9a736282e75ebf838840798 /src/gpu/GrPictureUtils.cpp
parent77d724c07878b21602e96e095f6a446c429a079a (diff)
Try out scalar picture sizes
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
Diffstat (limited to 'src/gpu/GrPictureUtils.cpp')
-rw-r--r--src/gpu/GrPictureUtils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/GrPictureUtils.cpp b/src/gpu/GrPictureUtils.cpp
index 521160ac8a..4b0f77f386 100644
--- a/src/gpu/GrPictureUtils.cpp
+++ b/src/gpu/GrPictureUtils.cpp
@@ -23,10 +23,11 @@ public:
CollectLayers(const SkPicture* pict, GrAccelData* accelData)
: fPictureID(pict->uniqueID())
, fCTM(&SkMatrix::I())
- , fCurrentClipBounds(SkIRect::MakeXYWH(0, 0, pict->width(), pict->height()))
, fSaveLayersInStack(0)
, fAccelData(accelData) {
+ pict->cullRect().roundOut(&fCurrentClipBounds);
+
if (NULL == pict->fRecord.get()) {
return;
}
@@ -255,7 +256,7 @@ private:
// GPUOptimize is only intended to be called within the context of SkGpuDevice's
// EXPERIMENTAL_optimize method.
const GrAccelData* GPUOptimize(const SkPicture* pict) {
- if (NULL == pict || 0 == pict->width() || 0 == pict->height()) {
+ if (NULL == pict || pict->cullRect().isEmpty()) {
return NULL;
}