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

Unified Diff: mojo/examples/pepper_container_app/pepper_container_app.cc

Issue 480723002: Revert of Mojo multiple command buffer support and sample (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/examples/compositor_app/compositor_app.cc ('k') | mojo/examples/sample_app/sample_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/pepper_container_app/pepper_container_app.cc
diff --git a/mojo/examples/pepper_container_app/pepper_container_app.cc b/mojo/examples/pepper_container_app/pepper_container_app.cc
index 6d35f3565aaa6fa47871db67948cb9fd18c3a431..18df756eba488fc5a296c7b6e145bb3f589e5598 100644
--- a/mojo/examples/pepper_container_app/pepper_container_app.cc
+++ b/mojo/examples/pepper_container_app/pepper_container_app.cc
@@ -14,7 +14,6 @@
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/system/core.h"
-#include "mojo/services/public/interfaces/gpu/gpu.mojom.h"
#include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/shared_impl/proxy_lock.h"
@@ -36,9 +35,6 @@
app->ConnectToService("mojo:mojo_native_viewport_service", &viewport_);
viewport_.set_client(this);
- // TODO(jamesr): Should be mojo:mojo_gpu_service
- app->ConnectToService("mojo:mojo_native_viewport_service", &gpu_service_);
-
RectPtr rect(Rect::New());
rect->x = 10;
rect->y = 10;
@@ -49,8 +45,7 @@
}
// NativeViewportClient implementation.
- virtual void OnCreated(uint64_t native_viewport_id) OVERRIDE {
- native_viewport_id_ = native_viewport_id;
+ virtual void OnCreated() OVERRIDE {
ppapi::ProxyAutoLock lock;
plugin_instance_ = plugin_module_->CreateInstance().Pass();
@@ -58,7 +53,7 @@
plugin_instance_.reset();
}
- virtual void OnDestroyed() OVERRIDE {
+ virtual void OnDestroyed(const mojo::Callback<void()>& callback) OVERRIDE {
ppapi::ProxyAutoLock lock;
if (plugin_instance_) {
@@ -67,6 +62,7 @@
}
base::MessageLoop::current()->Quit();
+ callback.Run();
}
virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE {
@@ -89,20 +85,14 @@
// MojoPpapiGlobals::Delegate implementation.
virtual ScopedMessagePipeHandle CreateGLES2Context() OVERRIDE {
CommandBufferPtr command_buffer;
- SizePtr size = Size::New();
- size->width = 800;
- size->width = 600;
- gpu_service_->CreateOnscreenGLES2Context(
- native_viewport_id_, size.Pass(), Get(&command_buffer));
+ viewport_->CreateGLES2Context(Get(&command_buffer));
return command_buffer.PassMessagePipe();
}
private:
MojoPpapiGlobals ppapi_globals_;
- uint64_t native_viewport_id_;
NativeViewportPtr viewport_;
- GpuPtr gpu_service_;
scoped_refptr<PluginModule> plugin_module_;
scoped_ptr<PluginInstance> plugin_instance_;
« no previous file with comments | « mojo/examples/compositor_app/compositor_app.cc ('k') | mojo/examples/sample_app/sample_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698