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

Unified Diff: mojo/apps/js/bindings/gl/context.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
« no previous file with comments | « mojo/apps/js/bindings/gl/context.h ('k') | mojo/apps/js/main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/apps/js/bindings/gl/context.cc
diff --git a/mojo/apps/js/bindings/gl/context.cc b/mojo/apps/js/bindings/gl/context.cc
index 878a873427a09e7f84afc2ec6b8c3dff68f09444..a4f54feac6820d81a4af7c2b7662a9243b36625d 100644
--- a/mojo/apps/js/bindings/gl/context.cc
+++ b/mojo/apps/js/bindings/gl/context.cc
@@ -166,7 +166,7 @@ Context::~Context() {
MojoGLES2DestroyContext(context_);
}
-void Context::DidCreateContext(uint32_t width, uint32_t height) {
+void Context::DidCreateContext() {
// TODO(aa): When we want to support multiple contexts, we should add
// Context::MakeCurrent() for developers to switch between them.
MojoGLES2MakeCurrent(context_);
@@ -178,18 +178,11 @@ void Context::DidCreateContext(uint32_t width, uint32_t height) {
v8::Handle<v8::Function> callback = v8::Local<v8::Function>::New(
isolate, did_create_callback_);
- v8::Handle<v8::Value> args[] = {
- gin::ConvertToV8(isolate, width),
- gin::ConvertToV8(isolate, height),
- };
- runner_->Call(callback, runner_->global(), 2, args);
+ runner_->Call(callback, runner_->global(), 0, NULL);
}
-void Context::DidCreateContextThunk(
- void* closure,
- uint32_t width,
- uint32_t height) {
- static_cast<Context*>(closure)->DidCreateContext(width, height);
+void Context::DidCreateContextThunk(void* closure) {
+ static_cast<Context*>(closure)->DidCreateContext();
}
void Context::ContextLost() {
« no previous file with comments | « mojo/apps/js/bindings/gl/context.h ('k') | mojo/apps/js/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698