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

Unified Diff: webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 665463003: gpu: Add CHROMIUM_image support to in-process command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-gpu-memory-buffer-factory-to-gpu-image-factory
Patch Set: make code more consistent with command buffer proxy Created 6 years, 2 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: webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index c96f464c2fcbf5213d29fd4ba0267f8752e2384a..cd5478472e6dee6035842c61ad792ba9cf06f490 100644
--- a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -39,11 +39,13 @@ WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext(
DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone);
bool is_offscreen = false;
return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
- scoped_ptr< ::gpu::GLInProcessContext>(),
+ scoped_ptr<::gpu::GLInProcessContext>(),
attributes,
lose_context_when_out_of_memory,
is_offscreen,
- window));
+ window,
+ nullptr,
+ nullptr));
}
// static
@@ -53,11 +55,13 @@ WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
bool lose_context_when_out_of_memory) {
bool is_offscreen = true;
return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
- scoped_ptr< ::gpu::GLInProcessContext>(),
+ scoped_ptr<::gpu::GLInProcessContext>(),
attributes,
lose_context_when_out_of_memory,
is_offscreen,
- gfx::kNullAcceleratedWidget));
+ gfx::kNullAcceleratedWidget,
+ nullptr,
+ nullptr));
}
scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
@@ -71,21 +75,27 @@ WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext(
attributes,
lose_context_when_out_of_memory,
is_offscreen,
- gfx::kNullAcceleratedWidget /* window. Not used. */));
+ gfx::kNullAcceleratedWidget /* window. Not used. */,
+ nullptr,
+ nullptr));
}
WebGraphicsContext3DInProcessCommandBufferImpl::
WebGraphicsContext3DInProcessCommandBufferImpl(
- scoped_ptr< ::gpu::GLInProcessContext> context,
+ scoped_ptr<::gpu::GLInProcessContext> context,
const blink::WebGraphicsContext3D::Attributes& attributes,
bool lose_context_when_out_of_memory,
bool is_offscreen,
- gfx::AcceleratedWidget window)
+ gfx::AcceleratedWidget window,
+ ::gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ ::gpu::ImageFactory* image_factory)
: share_resources_(attributes.shareResources),
webgl_context_(attributes.webGL),
is_offscreen_(is_offscreen),
window_(window),
- context_(context.Pass()) {
+ context_(context.Pass()),
+ gpu_memory_buffer_manager_(gpu_memory_buffer_manager),
+ image_factory_(image_factory) {
ConvertAttributes(attributes, &attribs_);
attribs_.lose_context_when_out_of_memory = lose_context_when_out_of_memory;
}
@@ -122,7 +132,9 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::MaybeInitializeGL() {
share_resources_,
attribs_,
gpu_preference,
- ::gpu::GLInProcessContextSharedMemoryLimits()));
+ ::gpu::GLInProcessContextSharedMemoryLimits(),
+ gpu_memory_buffer_manager_,
+ image_factory_));
}
if (context_) {

Powered by Google App Engine
This is Rietveld 408576698