From b0120fd2849a2e938b1f175407429eea6a94069e Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Thu, 30 Oct 2014 14:20:45 -0700 Subject: [PATCH] Make it possible to change the viewport size This makes it possible to change the viewport size which mojo is using. The sky debugger uses this new API to set the viewport to something closer to mobile instead of 800x600 ancient desktop size. :) Still the (800, 600) constant is prevelant throughout mojo (just search for it) and mojo does not seem to fully update when the viewport size changes, so we actually only see 320x600 pixels instead of 320x640 in sky debugger after this change. Mostly this change is about validating that this is the correct way to plumb this information. R=sky@chromium.org Review URL: https://codereview.chromium.org/692693002 --- engine/src/flutter/tools/debugger/debugger.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/src/flutter/tools/debugger/debugger.cc b/engine/src/flutter/tools/debugger/debugger.cc index e9a77a2f5c..82b0ea154f 100644 --- a/engine/src/flutter/tools/debugger/debugger.cc +++ b/engine/src/flutter/tools/debugger/debugger.cc @@ -65,6 +65,8 @@ class SkyDebugger : public mojo::ApplicationDelegate, root_ = root; root_->AddObserver(this); + window_manager_app_->SetViewportSize(gfx::Size(320, 640)); + content_ = mojo::View::Create(view_manager_); content_->SetBounds(root_->bounds()); root_->AddChild(content_);