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

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

Issue 541913002: Create a GraphicsContext from a DisplayList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@display-list-changes
Patch Set: Rebased Created 6 years, 3 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') | Source/web/LinkHighlight.h » ('J')
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 8647e4f20b1bed5f77086090c4d321eb2cf424c9..40d1669a04882f1f1230d607aabed9f9f087ac3a 100644
--- a/Source/platform/graphics/GraphicsContext.h
+++ b/Source/platform/graphics/GraphicsContext.h
@@ -75,7 +75,12 @@ public:
FullyDisabled = 1 // Do absolutely minimal work to remove the cost of the context from performance tests.
};
+ // Create a context using an existing canvas.
explicit GraphicsContext(SkCanvas*, DisabledMode = NothingDisabled);
+
+ // Create a context with a recording canvas of the given size, and beginRecording on it.
+ explicit GraphicsContext(const FloatRect&, DisabledMode = NothingDisabled);
+
~GraphicsContext();
// Returns the canvas used for painting. Must not be called if painting is disabled.
@@ -425,6 +430,10 @@ private:
return m_paintState;
}
+ void initializeStateStack();
+
+ void beginRecordingImpl(PassRefPtr<DisplayList>, uint32_t, SkCanvas*, SkMatrix&);
+
static void setPathFromConvexPoints(SkPath*, size_t, const FloatPoint*);
static void setRadii(SkVector*, IntSize, IntSize, IntSize, IntSize);
« no previous file with comments | « no previous file | Source/platform/graphics/GraphicsContext.cpp » ('j') | Source/web/LinkHighlight.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698