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

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: gpu/ipc/common/OWNERS presubmit 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
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..90c6e8d4ee116a66452f9841b6a387e97bc9eb26 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(attribs.offscreen_framebuffer_size.width() >= 0 &&
danakj 2016/06/29 18:25:54 nit: 2 dchecks, and GE
piman 2016/06/29 20:28:51 Done.
+ 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;

Powered by Google App Engine
This is Rietveld 408576698