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

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 763493003: Track scissored damage area for WebGL Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/core/html/canvas/WebGLRenderingContextBase.h ('k') | Source/core/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index 83001cc340df67394833985a36c25f2d597952f9..1aec211c2b81e34da7edaf82c2079271c0038493 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -802,7 +802,10 @@ void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType)
if (renderBox && renderBox->hasAcceleratedCompositing()) {
m_markedCanvasDirty = true;
canvas()->clearCopiedImage();
- renderBox->contentChanged(changeType);
+ IntRect rect = IntRect(IntPoint(0, 0), clampedCanvasSize());
+ if (!m_flippedScissorBox.isEmpty())
+ rect.intersect(m_flippedScissorBox);
+ renderBox->contentChanged(changeType, rect);
} else {
if (!m_markedCanvasDirty) {
m_markedCanvasDirty = true;
@@ -3239,6 +3242,8 @@ void WebGLRenderingContextBase::scissor(GLint x, GLint y, GLsizei width, GLsizei
return;
if (!validateSize("scissor", width, height))
return;
+
+ m_flippedScissorBox = IntRect(x, canvas()->height() - height, width, height - y);
webContext()->scissor(x, y, width, height);
}
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.h ('k') | Source/core/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698