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

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: Reduce size of PlaybackReplacements in SkPicturePlayback.h 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
« no previous file with comments | « src/gpu/GrPictureUtils.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPictureUtils.cpp
===================================================================
--- src/gpu/GrPictureUtils.cpp (revision 14614)
+++ src/gpu/GrPictureUtils.cpp (working copy)
@@ -9,6 +9,7 @@
#include "SkDevice.h"
#include "SkDraw.h"
#include "SkPaintPriv.h"
+#include "SkPicturePlayback.h"
SkPicture::AccelData::Key GPUAccelData::ComputeAccelDataKey() {
static const SkPicture::AccelData::Key gGPUID = SkPicture::AccelData::GenerateDomain();
@@ -249,7 +250,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
« no previous file with comments | « src/gpu/GrPictureUtils.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698