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

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

Issue 2517343003: Update Resize information from OffscreenCanvas to OffscreenCanvasFrameDispatcher (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
xidachen 2016/11/22 18:41:45 As discussed offline, please change this to use m_
+ }
}
void OffscreenCanvas::setNeutered() {
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698