| Index: src/gpu/GrPictureUtils.cpp
|
| diff --git a/src/gpu/GrPictureUtils.cpp b/src/gpu/GrPictureUtils.cpp
|
| index 7295089e821cefff413d55c425c69c082794c37b..854756e60d44b7913f9655061e19ba2752b0d490 100644
|
| --- a/src/gpu/GrPictureUtils.cpp
|
| +++ b/src/gpu/GrPictureUtils.cpp
|
| @@ -237,7 +237,7 @@ protected:
|
|
|
| virtual void onDrawPicture(const SkPicture* picture, const SkMatrix* matrix,
|
| const SkPaint* paint) SK_OVERRIDE {
|
| - SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->width(), picture->height());
|
| + SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect());
|
|
|
| if (NULL != picture->fData.get()) {
|
| // Disable the BBH for the old path so all the draw calls
|
| @@ -260,7 +260,7 @@ private:
|
| // GatherGPUInfo is only intended to be called within the context of SkGpuDevice's
|
| // EXPERIMENTAL_optimize method.
|
| void GatherGPUInfo(const SkPicture* pict, GrAccelData* accelData) {
|
| - if (NULL == pict || 0 == pict->width() || 0 == pict->height()) {
|
| + if (NULL == pict || pict->cullRect().isEmpty()) {
|
| return ;
|
| }
|
|
|
| @@ -269,11 +269,11 @@ void GatherGPUInfo(const SkPicture* pict, GrAccelData* accelData) {
|
| SkPicturePlayback playback(pict);
|
| playback.setUseBBH(false);
|
|
|
| - GrGatherDevice device(pict->width(), pict->height(), &playback, accelData, 0);
|
| + GrGatherDevice device(SkScalarCeilToInt(pict->cullRect().width()),
|
| + SkScalarCeilToInt(pict->cullRect().height()),
|
| + &playback, accelData, 0);
|
| GrGatherCanvas canvas(&device);
|
|
|
| - canvas.clipRect(SkRect::MakeWH(SkIntToScalar(pict->width()),
|
| - SkIntToScalar(pict->height())),
|
| - SkRegion::kIntersect_Op, false);
|
| + canvas.clipRect(pict->cullRect(), SkRegion::kIntersect_Op, false);
|
| playback.draw(&canvas, NULL);
|
| }
|
|
|