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

Unified Diff: Source/platform/graphics/GraphicsContext.h

Issue 1087633002: [SP] Allocate an SkPictureRecorder only once per GraphicsContext instantiation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | « no previous file | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.h
diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h
index 697aa1be3348fdaa8df5668028eaa66e2d446eb9..2e7df81118fc815e9a36670354e0740358f995d3 100644
--- a/Source/platform/graphics/GraphicsContext.h
+++ b/Source/platform/graphics/GraphicsContext.h
@@ -38,6 +38,7 @@
#include "platform/graphics/GraphicsContextAnnotation.h"
#include "platform/graphics/GraphicsContextState.h"
#include "platform/graphics/skia/SkiaUtils.h"
+#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "wtf/FastAllocBase.h"
#include "wtf/Forward.h"
@@ -424,6 +425,10 @@ private:
// null indicates painting is contextDisabled. Never delete this object.
SkCanvas* m_canvas;
+ // This stores the canvas object used to construct the GraphicsContext, if any. It is only
+ // used when Slimming Paint is active.
+ SkCanvas* m_originalCanvas;
+
// This being null indicates not to paint into a DisplayItemList, and instead directly into the canvas.
DisplayItemList* m_displayItemList;
@@ -440,7 +445,9 @@ private:
AnnotationModeFlags m_annotationMode;
+ // Only used when Slimming Paint is off. When it is on, m_pictureRecorder is used instead.
Vector<OwnPtr<RecordingState>> m_recordingStateStack;
+ SkPictureRecorder m_pictureRecorder;
#if ENABLE(ASSERT)
unsigned m_layerCount;
« no previous file with comments | « no previous file | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698