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

Unified Diff: chrome/renderer/ggl/ggl.cc

Issue 6343006: Route IPC through browser when creating a viewable command buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 9 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 | « chrome/renderer/ggl/ggl.h ('k') | chrome/renderer/gpu_channel_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/ggl/ggl.cc
diff --git a/chrome/renderer/ggl/ggl.cc b/chrome/renderer/ggl/ggl.cc
index 8dea5092fdc86a1c3b0d30d6c0accd4c82744b61..43b6f67118c7553636b738d530a870351f00dc69 100644
--- a/chrome/renderer/ggl/ggl.cc
+++ b/chrome/renderer/ggl/ggl.cc
@@ -62,7 +62,7 @@ class Context : public base::SupportsWeakPtr<Context> {
// Initialize a GGL context that can be used in association with a a GPU
// channel acquired from a RenderWidget or RenderView.
- bool Initialize(gfx::NativeViewId view,
+ bool Initialize(bool onscreen,
int render_view_id,
const gfx::Size& size,
const char* allowed_extensions,
@@ -156,7 +156,7 @@ Context::~Context() {
Destroy();
}
-bool Context::Initialize(gfx::NativeViewId view,
+bool Context::Initialize(bool onscreen,
int render_view_id,
const gfx::Size& size,
const char* allowed_extensions,
@@ -207,9 +207,8 @@ bool Context::Initialize(gfx::NativeViewId view,
}
// Create a proxy to a command buffer in the GPU process.
- if (view) {
+ if (onscreen) {
command_buffer_ = channel_->CreateViewCommandBuffer(
- view,
render_view_id,
allowed_extensions,
attribs);
@@ -434,14 +433,13 @@ void Context::OnSwapBuffers() {
#endif // ENABLE_GPU
Context* CreateViewContext(GpuChannelHost* channel,
- gfx::NativeViewId view,
int render_view_id,
const char* allowed_extensions,
const int32* attrib_list) {
#if defined(ENABLE_GPU)
scoped_ptr<Context> context(new Context(channel, NULL));
if (!context->Initialize(
- view, render_view_id, gfx::Size(), allowed_extensions, attrib_list))
+ true, render_view_id, gfx::Size(), allowed_extensions, attrib_list))
return NULL;
return context.release();
@@ -465,7 +463,7 @@ Context* CreateOffscreenContext(GpuChannelHost* channel,
const int32* attrib_list) {
#if defined(ENABLE_GPU)
scoped_ptr<Context> context(new Context(channel, parent));
- if (!context->Initialize(0, 0, size, allowed_extensions, attrib_list))
+ if (!context->Initialize(false, 0, size, allowed_extensions, attrib_list))
return NULL;
return context.release();
« no previous file with comments | « chrome/renderer/ggl/ggl.h ('k') | chrome/renderer/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698