Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: src/gpu/GrPictureUtils.cpp

Issue 261663003: First pass at pre-rendering saveLayers for GPU (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fixed comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrPictureUtils.cpp
===================================================================
--- src/gpu/GrPictureUtils.cpp (revision 14572)
+++ src/gpu/GrPictureUtils.cpp (working copy)
@@ -9,6 +9,7 @@
#include "SkDevice.h"
#include "SkDraw.h"
#include "SkPaintPriv.h"
+#include "SkPicturePlayback.h"
// The GrGather device performs GPU-backend-specific preprocessing on
// a picture. The results are stored in a GPUAccelData.
@@ -243,7 +244,15 @@
}
virtual void drawPicture(SkPicture& picture) SK_OVERRIDE {
+ // BBH-based rendering doesn't re-issue many of the operations the gather
+ // process cares about (e.g., saves and restores) so it must be disabled.
+ if (NULL != picture.fPlayback) {
+ picture.fPlayback->setUseBBH(false);
+ }
picture.draw(this);
+ if (NULL != picture.fPlayback) {
+ picture.fPlayback->setUseBBH(true);
+ }
}
protected:
// disable aa for speed

Powered by Google App Engine
This is Rietveld 408576698