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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 1168993002: Update the native_viewport interface to allow specification of the surface configuration, currently… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Final cleanups Created 5 years, 6 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 | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/config/gpu_info_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index 65986f82540b9945fb79f2d626b319bbe4b5dbfb..2036ed0ea552781578d2a538666863839a1aa08a 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -240,6 +240,30 @@ gfx::GpuMemoryBufferHandle ShareGpuMemoryBufferToGpuThread(
} // anonyous namespace
+
+InProcessCommandBuffer::
+ InitializeOnGpuThreadParams::InitializeOnGpuThreadParams(
+ bool is_offscreen,
+ gfx::AcceleratedWidget window,
+ const gfx::Size& size,
+ const std::vector<int32>& attribs,
+ gfx::GpuPreference gpu_preference,
+ gpu::Capabilities* capabilities,
+ InProcessCommandBuffer* share_group,
+ ImageFactory* image_factory,
+ const gfx::SurfaceConfiguration& requested_configuration)
+ : is_offscreen(is_offscreen),
+ window(window),
+ size(size),
+ attribs(attribs),
+ gpu_preference(gpu_preference),
+ capabilities(capabilities),
+ context_group(share_group),
+ image_factory(image_factory),
+ requested_configuration(requested_configuration) {
+}
+
+
InProcessCommandBuffer::Service::Service() {}
InProcessCommandBuffer::Service::~Service() {}
@@ -343,7 +367,8 @@ bool InProcessCommandBuffer::Initialize(
const base::Closure& context_lost_callback,
InProcessCommandBuffer* share_group,
GpuMemoryBufferManager* gpu_memory_buffer_manager,
- ImageFactory* image_factory) {
+ ImageFactory* image_factory,
+ const gfx::SurfaceConfiguration& requested_configuration) {
DCHECK(!share_group || service_.get() == share_group->service_.get());
context_lost_callback_ = WrapCallback(context_lost_callback);
@@ -362,7 +387,8 @@ bool InProcessCommandBuffer::Initialize(
gpu_preference,
&capabilities,
share_group,
- image_factory);
+ image_factory,
+ requested_configuration);
base::Callback<bool(void)> init_task =
base::Bind(&InProcessCommandBuffer::InitializeOnGpuThread,
@@ -439,9 +465,11 @@ bool InProcessCommandBuffer::InitializeOnGpuThread(
if (!surface_.get()) {
if (params.is_offscreen)
- surface_ = gfx::GLSurface::CreateOffscreenGLSurface(params.size);
+ surface_ = gfx::GLSurface::CreateOffscreenGLSurface(
+ params.size, params.requested_configuration);
else
- surface_ = gfx::GLSurface::CreateViewGLSurface(params.window);
+ surface_ = gfx::GLSurface::CreateViewGLSurface(
+ params.window, params.requested_configuration);
}
if (!surface_.get()) {
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/config/gpu_info_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698