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

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: fix test + review comments 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 bff9199f8ef1b879b5122f0d673e71e12f80e858..f79132363ff47760445530bdeff078f0df9acd8a 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -1389,15 +1389,12 @@ void WebGLRenderingContextBase::markContextChanged(
LayoutBox* layoutBox = canvas()->layoutBox();
if (layoutBox && layoutBox->hasAcceleratedCompositing()) {
- m_markedCanvasDirty = true;
- canvas()->clearCopiedImage();
xlai (Olivia) 2017/02/08 17:58:40 Why is this removed?
Justin Novosad 2017/02/08 18:43:12 Because it was already being called by HTMLCanvasE
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()));
}
}

Powered by Google App Engine
This is Rietveld 408576698