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

Side by Side Diff: gpu/command_buffer/client/gl_in_process_context.cc

Issue 1900993002: Move SharedMemoryLimits out of WebGraphicsContext3DCommandBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@limits
Patch Set: move-limits: types Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/client/gl_in_process_context.h" 5 #include "gpu/command_buffer/client/gl_in_process_context.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 10 matching lines...) Expand all
21 21
22 #include "base/bind.h" 22 #include "base/bind.h"
23 #include "base/bind_helpers.h" 23 #include "base/bind_helpers.h"
24 #include "base/lazy_instance.h" 24 #include "base/lazy_instance.h"
25 #include "base/logging.h" 25 #include "base/logging.h"
26 #include "base/macros.h" 26 #include "base/macros.h"
27 #include "base/memory/weak_ptr.h" 27 #include "base/memory/weak_ptr.h"
28 #include "base/message_loop/message_loop.h" 28 #include "base/message_loop/message_loop.h"
29 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 29 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
30 #include "gpu/command_buffer/client/gles2_implementation.h" 30 #include "gpu/command_buffer/client/gles2_implementation.h"
31 #include "gpu/command_buffer/client/shared_memory_limits.h"
31 #include "gpu/command_buffer/client/transfer_buffer.h" 32 #include "gpu/command_buffer/client/transfer_buffer.h"
32 #include "gpu/command_buffer/common/command_buffer.h" 33 #include "gpu/command_buffer/common/command_buffer.h"
33 #include "gpu/command_buffer/common/constants.h" 34 #include "gpu/command_buffer/common/constants.h"
34 #include "ui/gfx/geometry/size.h" 35 #include "ui/gfx/geometry/size.h"
35 #include "ui/gl/gl_image.h" 36 #include "ui/gl/gl_image.h"
36 37
37 #if defined(OS_ANDROID) 38 #if defined(OS_ANDROID)
38 #include "ui/gl/android/surface_texture.h" 39 #include "ui/gl/android/surface_texture.h"
39 #endif 40 #endif
40 41
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 command_buffer_.reset(); 202 command_buffer_.reset();
202 } 203 }
203 204
204 } // anonymous namespace 205 } // anonymous namespace
205 206
206 GLInProcessContextSharedMemoryLimits::GLInProcessContextSharedMemoryLimits() 207 GLInProcessContextSharedMemoryLimits::GLInProcessContextSharedMemoryLimits()
207 : command_buffer_size(kDefaultCommandBufferSize), 208 : command_buffer_size(kDefaultCommandBufferSize),
208 start_transfer_buffer_size(kDefaultStartTransferBufferSize), 209 start_transfer_buffer_size(kDefaultStartTransferBufferSize),
209 min_transfer_buffer_size(kDefaultMinTransferBufferSize), 210 min_transfer_buffer_size(kDefaultMinTransferBufferSize),
210 max_transfer_buffer_size(kDefaultMaxTransferBufferSize), 211 max_transfer_buffer_size(kDefaultMaxTransferBufferSize),
211 mapped_memory_reclaim_limit(gles2::GLES2Implementation::kNoLimit) { 212 mapped_memory_reclaim_limit(SharedMemoryLimits::kNoLimit) {}
212 }
213 213
214 // static 214 // static
215 GLInProcessContext* GLInProcessContext::Create( 215 GLInProcessContext* GLInProcessContext::Create(
216 scoped_refptr<gpu::InProcessCommandBuffer::Service> service, 216 scoped_refptr<gpu::InProcessCommandBuffer::Service> service,
217 scoped_refptr<gfx::GLSurface> surface, 217 scoped_refptr<gfx::GLSurface> surface,
218 bool is_offscreen, 218 bool is_offscreen,
219 gfx::AcceleratedWidget window, 219 gfx::AcceleratedWidget window,
220 const gfx::Size& size, 220 const gfx::Size& size,
221 GLInProcessContext* share_context, 221 GLInProcessContext* share_context,
222 const ::gpu::gles2::ContextCreationAttribHelper& attribs, 222 const ::gpu::gles2::ContextCreationAttribHelper& attribs,
(...skipping 18 matching lines...) Expand all
241 gpu_preference, 241 gpu_preference,
242 service, 242 service,
243 gpu_memory_buffer_manager, 243 gpu_memory_buffer_manager,
244 image_factory)) 244 image_factory))
245 return NULL; 245 return NULL;
246 246
247 return context.release(); 247 return context.release();
248 } 248 }
249 249
250 } // namespace gpu 250 } // namespace gpu
OLDNEW
« no previous file with comments | « content/renderer/webgraphicscontext3d_provider_impl.cc ('k') | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698