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

Unified Diff: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp

Issue 2521013003: Compositing Layer update for OffscreenCanvas resize (Closed)
Patch Set: test Created 4 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
Index: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
index 550ae97f7812703f3bfd86bc1fb93d68371313ce..9677abbd610d402ec29af3c4c2b47377664d46b9 100644
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
@@ -42,6 +42,8 @@ void OffscreenCanvas::setHeight(unsigned height) {
}
void OffscreenCanvas::setSize(const IntSize& size) {
+ if (size == m_size)
+ return;
if (m_context) {
if (m_context->is3d()) {
if (size != m_size)
@@ -51,6 +53,9 @@ void OffscreenCanvas::setSize(const IntSize& size) {
}
}
m_size = size;
+ if (m_frameDispatcher) {
+ m_frameDispatcher->reshape(width(), height());
+ }
}
void OffscreenCanvas::setNeutered() {

Powered by Google App Engine
This is Rietveld 408576698