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

Unified Diff: gpu/command_buffer/client/gl_in_process_context.cc

Issue 2107783003: Pass initial size and GPU preference via context attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp fix Created 4 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/client/gl_in_process_context.h ('k') | gpu/command_buffer/command_buffer.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gl_in_process_context.cc
diff --git a/gpu/command_buffer/client/gl_in_process_context.cc b/gpu/command_buffer/client/gl_in_process_context.cc
index 72e1eaf715a568042a037dcb2d62d632784656a7..c87f23396c7d7d5096f012fd9d4962715d78ac8d 100644
--- a/gpu/command_buffer/client/gl_in_process_context.cc
+++ b/gpu/command_buffer/client/gl_in_process_context.cc
@@ -54,9 +54,7 @@ class GLInProcessContextImpl
bool is_offscreen,
GLInProcessContext* share_context,
gfx::AcceleratedWidget window,
- const gfx::Size& size,
const gpu::gles2::ContextCreationAttribHelper& attribs,
- gl::GpuPreference gpu_preference,
const scoped_refptr<InProcessCommandBuffer::Service>& service,
const SharedMemoryLimits& mem_limits,
GpuMemoryBufferManager* gpu_memory_buffer_manager,
@@ -97,14 +95,13 @@ bool GLInProcessContextImpl::Initialize(
bool is_offscreen,
GLInProcessContext* share_context,
gfx::AcceleratedWidget window,
- const gfx::Size& size,
const gles2::ContextCreationAttribHelper& attribs,
- gl::GpuPreference gpu_preference,
const scoped_refptr<InProcessCommandBuffer::Service>& service,
const SharedMemoryLimits& mem_limits,
GpuMemoryBufferManager* gpu_memory_buffer_manager,
ImageFactory* image_factory) {
- DCHECK(size.width() >= 0 && size.height() >= 0);
+ DCHECK_GE(attribs.offscreen_framebuffer_size.width(), 0);
+ DCHECK_GE(attribs.offscreen_framebuffer_size.height(), 0);
command_buffer_.reset(new InProcessCommandBuffer(service));
@@ -122,9 +119,7 @@ bool GLInProcessContextImpl::Initialize(
if (!command_buffer_->Initialize(surface,
is_offscreen,
window,
- size,
attribs,
- gpu_preference,
share_command_buffer,
gpu_memory_buffer_manager,
image_factory)) {
@@ -194,22 +189,19 @@ GLInProcessContext* GLInProcessContext::Create(
scoped_refptr<gl::GLSurface> surface,
bool is_offscreen,
gfx::AcceleratedWidget window,
- const gfx::Size& size,
GLInProcessContext* share_context,
const ::gpu::gles2::ContextCreationAttribHelper& attribs,
- gl::GpuPreference gpu_preference,
const SharedMemoryLimits& memory_limits,
GpuMemoryBufferManager* gpu_memory_buffer_manager,
ImageFactory* image_factory) {
if (surface.get()) {
DCHECK_EQ(surface->IsOffscreen(), is_offscreen);
- DCHECK(surface->GetSize() == size);
DCHECK_EQ(gfx::kNullAcceleratedWidget, window);
}
std::unique_ptr<GLInProcessContextImpl> context(new GLInProcessContextImpl);
- if (!context->Initialize(surface, is_offscreen, share_context, window, size,
- attribs, gpu_preference, service, memory_limits,
+ if (!context->Initialize(surface, is_offscreen, share_context, window,
+ attribs, service, memory_limits,
gpu_memory_buffer_manager, image_factory))
return NULL;
« no previous file with comments | « gpu/command_buffer/client/gl_in_process_context.h ('k') | gpu/command_buffer/command_buffer.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698