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

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

Issue 204093002: GraphicsContext culling support. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Flag disabled by default. 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
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | Source/platform/graphics/GraphicsContextCullSaver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 5f8fc1109c2669579e506d99d1ce31415100ce46..5d699d8ee99a594b1eaccfe93f19279b1871c1f3 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())
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | Source/platform/graphics/GraphicsContextCullSaver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698