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

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

Issue 204093002: GraphicsContext culling support. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop GC cull stack, misc fixes. Created 6 years, 9 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: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 610dd132735864e15c93a1af39b884ffc144ab92..2bc17ac0298ba2e1adc2a203978d8f740f4db791 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -1525,6 +1525,25 @@ void GraphicsContext::clipRRect(const SkRRect& rect, AntiAliasingMode aa, SkRegi
m_canvas->clipRRect(rect, op, aa == AntiAliased);
}
+void GraphicsContext::beginCull(const FloatRect& rect)
+{
+ if (paintingDisabled())
+ return;
+
+ realizeCanvasSave(SkCanvas::kMatrixClip_SaveFlag);
+ m_canvas->pushCull(rect);
+}
+
+void GraphicsContext::endCull()
+{
+ if (paintingDisabled())
+ return;
+
+ realizeCanvasSave(SkCanvas::kMatrixClip_SaveFlag);
+
+ m_canvas->popCull();
+}
+
void GraphicsContext::rotate(float angleInRadians)
{
if (paintingDisabled())

Powered by Google App Engine
This is Rietveld 408576698