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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2653933003: Make stream captures work on canvases that are not in the DOM. (Closed)
Patch Set: rebase Created 3 years, 10 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: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 10c2c319cf8450af38e6ac25df69f34210926c26..010b60b6f884accdd1487866ab9224937604af86 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -1399,15 +1399,12 @@ void WebGLRenderingContextBase::markContextChanged(
LayoutBox* layoutBox = canvas()->layoutBox();
if (layoutBox && layoutBox->hasAcceleratedCompositing()) {
- m_markedCanvasDirty = true;
- canvas()->clearCopiedImage();
layoutBox->contentChanged(changeType);
- } else {
- if (!m_markedCanvasDirty) {
- m_markedCanvasDirty = true;
- canvas()->didDraw(
- FloatRect(FloatPoint(0, 0), FloatSize(clampedCanvasSize())));
- }
+ }
+ if (!m_markedCanvasDirty) {
+ m_markedCanvasDirty = true;
+ IntSize canvasSize = clampedCanvasSize();
+ didDraw(SkIRect::MakeXYWH(0, 0, canvasSize.width(), canvasSize.height()));
Ken Russell (switch to Gerrit) 2017/02/14 01:31:38 This is going to be triggered all the time now, an
Justin Novosad 2017/02/14 18:36:25 This does not get called more than once per frame
}
}

Powered by Google App Engine
This is Rietveld 408576698