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

Unified Diff: gpu/ipc/gl_in_process_context.cc

Issue 2498053004: Add InProcessContextProvider and update InProcessCommandBuffer (Closed)
Patch Set: Revert experiments and fix android_webview Created 4 years, 1 month 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 | « gpu/ipc/gl_in_process_context.h ('k') | gpu/ipc/gpu_in_process_thread_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/gl_in_process_context.cc
diff --git a/gpu/ipc/gl_in_process_context.cc b/gpu/ipc/gl_in_process_context.cc
index 16a1cb165000be73903c72fcce2a801c5d6eef90..7d734002a918e54936d06e94d5494c99ce6e100c 100644
--- a/gpu/ipc/gl_in_process_context.cc
+++ b/gpu/ipc/gl_in_process_context.cc
@@ -54,7 +54,7 @@ class GLInProcessContextImpl
bool Initialize(scoped_refptr<gl::GLSurface> surface,
bool is_offscreen,
GLInProcessContext* share_context,
- gfx::AcceleratedWidget window,
+ SurfaceHandle window,
const gpu::gles2::ContextCreationAttribHelper& attribs,
const scoped_refptr<InProcessCommandBuffer::Service>& service,
const SharedMemoryLimits& mem_limits,
@@ -64,6 +64,12 @@ class GLInProcessContextImpl
// GLInProcessContext implementation:
gles2::GLES2Implementation* GetImplementation() override;
+ void SetSwapBuffersCompletionCallback(
+ const gpu::InProcessCommandBuffer::SwapBuffersCompletionCallback&
+ callback) override;
+ void SetUpdateVSyncParametersCallback(
+ const gpu::InProcessCommandBuffer::UpdateVSyncParametersCallback&
+ callback) override;
void SetLock(base::Lock* lock) override;
private:
@@ -88,6 +94,18 @@ gles2::GLES2Implementation* GLInProcessContextImpl::GetImplementation() {
return gles2_implementation_.get();
}
+void GLInProcessContextImpl::SetSwapBuffersCompletionCallback(
+ const gpu::InProcessCommandBuffer::SwapBuffersCompletionCallback&
+ callback) {
+ command_buffer_->SetSwapBuffersCompletionCallback(callback);
+}
+
+void GLInProcessContextImpl::SetUpdateVSyncParametersCallback(
+ const gpu::InProcessCommandBuffer::UpdateVSyncParametersCallback&
+ callback) {
+ command_buffer_->SetUpdateVSyncParametersCallback(callback);
+}
+
void GLInProcessContextImpl::SetLock(base::Lock* lock) {
NOTREACHED();
}
@@ -96,7 +114,7 @@ bool GLInProcessContextImpl::Initialize(
scoped_refptr<gl::GLSurface> surface,
bool is_offscreen,
GLInProcessContext* share_context,
- gfx::AcceleratedWidget window,
+ SurfaceHandle window,
const gles2::ContextCreationAttribHelper& attribs,
const scoped_refptr<InProcessCommandBuffer::Service>& service,
const SharedMemoryLimits& mem_limits,
@@ -183,7 +201,7 @@ GLInProcessContext* GLInProcessContext::Create(
scoped_refptr<gpu::InProcessCommandBuffer::Service> service,
scoped_refptr<gl::GLSurface> surface,
bool is_offscreen,
- gfx::AcceleratedWidget window,
+ SurfaceHandle window,
GLInProcessContext* share_context,
const ::gpu::gles2::ContextCreationAttribHelper& attribs,
const SharedMemoryLimits& memory_limits,
@@ -196,7 +214,7 @@ GLInProcessContext* GLInProcessContext::Create(
if (surface) {
DCHECK_EQ(surface->IsOffscreen(), is_offscreen);
- DCHECK_EQ(gfx::kNullAcceleratedWidget, window);
+ DCHECK_EQ(kNullSurfaceHandle, window);
}
std::unique_ptr<GLInProcessContextImpl> context(new GLInProcessContextImpl);
« no previous file with comments | « gpu/ipc/gl_in_process_context.h ('k') | gpu/ipc/gpu_in_process_thread_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698