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

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

Issue 2106103005: Revert of Pass initial size and GPU preference via context attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/common/BUILD.gn » ('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 c87f23396c7d7d5096f012fd9d4962715d78ac8d..72e1eaf715a568042a037dcb2d62d632784656a7 100644
--- a/gpu/command_buffer/client/gl_in_process_context.cc
+++ b/gpu/command_buffer/client/gl_in_process_context.cc
@@ -54,7 +54,9 @@
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,
@@ -95,13 +97,14 @@
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_GE(attribs.offscreen_framebuffer_size.width(), 0);
- DCHECK_GE(attribs.offscreen_framebuffer_size.height(), 0);
+ DCHECK(size.width() >= 0 && size.height() >= 0);
command_buffer_.reset(new InProcessCommandBuffer(service));
@@ -119,7 +122,9 @@
if (!command_buffer_->Initialize(surface,
is_offscreen,
window,
+ size,
attribs,
+ gpu_preference,
share_command_buffer,
gpu_memory_buffer_manager,
image_factory)) {
@@ -189,19 +194,22 @@
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,
- attribs, service, memory_limits,
+ if (!context->Initialize(surface, is_offscreen, share_context, window, size,
+ attribs, gpu_preference, 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/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698