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

Unified Diff: mojo/services/native_viewport/native_viewport_service.cc

Issue 131153007: Send size to NativeViewportClient::OnCreated instead of GLES2Client::DidCreateContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix various issues Created 6 years, 11 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: mojo/services/native_viewport/native_viewport_service.cc
diff --git a/mojo/services/native_viewport/native_viewport_service.cc b/mojo/services/native_viewport/native_viewport_service.cc
index 3d42382c4e5c7df617d096c2fd800dbbecf9df4c..1067e748d195bbd676934e638881bc9aaeeba8ed 100644
--- a/mojo/services/native_viewport/native_viewport_service.cc
+++ b/mojo/services/native_viewport/native_viewport_service.cc
@@ -79,7 +79,7 @@ class NativeViewportService::NativeViewportImpl
if (widget_ == gfx::kNullAcceleratedWidget || !gles2_)
return;
gfx::Size size = native_viewport_->GetSize();
- if (size.width() == 0 || size.height() == 0)
+ if (size.IsEmpty())
return;
gles2_->CreateContext(widget_, size);
created_context_ = true;
@@ -146,6 +146,7 @@ class NativeViewportService::NativeViewportImpl
virtual void OnBoundsChanged(const gfx::Rect& bounds) MOJO_OVERRIDE {
CreateGLES2ContextIfNeeded();
+ AllocationScope allocation;
client_->OnBoundsChanged(bounds);
}
« no previous file with comments | « mojo/services/native_viewport/native_viewport_mac.mm ('k') | mojo/services/native_viewport/native_viewport_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698