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

Unified Diff: cc/surfaces/display.cc

Issue 361123002: Mojo surfaces service and example app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | mojo/examples/surfaces_app/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 944ca5dbbd334d10f9b44975398c6aef11ccb11c..af8f72783514c0decd074fd8a5e36a75a49e5d90 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -93,6 +93,10 @@ bool Display::Draw() {
TRACE_EVENT0("cc", "Display::Draw");
DelegatedFrameData* frame_data = frame->delegated_frame_data.get();
+ // Only reshape when we know we are going to draw. Otherwise, the reshape
+ // can leave the window at the wrong size if we never draw and the proper
+ // viewport size is never set.
+ output_surface_->Reshape(current_surface_size_, 1.f);
float device_scale_factor = 1.0f;
gfx::Rect device_viewport_rect = gfx::Rect(current_surface_size_);
gfx::Rect device_clip_rect = device_viewport_rect;
« no previous file with comments | « no previous file | mojo/examples/surfaces_app/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698