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

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: . 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 <set> 10 #include <set>
(...skipping 10 matching lines...) Expand all
21 #include "base/bind.h" 21 #include "base/bind.h"
22 #include "base/bind_helpers.h" 22 #include "base/bind_helpers.h"
23 #include "base/lazy_instance.h" 23 #include "base/lazy_instance.h"
24 #include "base/logging.h" 24 #include "base/logging.h"
25 #include "base/macros.h" 25 #include "base/macros.h"
26 #include "base/memory/scoped_ptr.h" 26 #include "base/memory/scoped_ptr.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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 219 }
219 #endif 220 #endif
220 221
221 } // anonymous namespace 222 } // anonymous namespace
222 223
223 GLInProcessContextSharedMemoryLimits::GLInProcessContextSharedMemoryLimits() 224 GLInProcessContextSharedMemoryLimits::GLInProcessContextSharedMemoryLimits()
224 : command_buffer_size(kDefaultCommandBufferSize), 225 : command_buffer_size(kDefaultCommandBufferSize),
225 start_transfer_buffer_size(kDefaultStartTransferBufferSize), 226 start_transfer_buffer_size(kDefaultStartTransferBufferSize),
226 min_transfer_buffer_size(kDefaultMinTransferBufferSize), 227 min_transfer_buffer_size(kDefaultMinTransferBufferSize),
227 max_transfer_buffer_size(kDefaultMaxTransferBufferSize), 228 max_transfer_buffer_size(kDefaultMaxTransferBufferSize),
228 mapped_memory_reclaim_limit(gles2::GLES2Implementation::kNoLimit) { 229 mapped_memory_reclaim_limit(SharedMemoryLimits::kNoLimit) {}
229 }
230 230
231 // static 231 // static
232 GLInProcessContext* GLInProcessContext::Create( 232 GLInProcessContext* GLInProcessContext::Create(
233 scoped_refptr<gpu::InProcessCommandBuffer::Service> service, 233 scoped_refptr<gpu::InProcessCommandBuffer::Service> service,
234 scoped_refptr<gfx::GLSurface> surface, 234 scoped_refptr<gfx::GLSurface> surface,
235 bool is_offscreen, 235 bool is_offscreen,
236 gfx::AcceleratedWidget window, 236 gfx::AcceleratedWidget window,
237 const gfx::Size& size, 237 const gfx::Size& size,
238 GLInProcessContext* share_context, 238 GLInProcessContext* share_context,
239 const ::gpu::gles2::ContextCreationAttribHelper& attribs, 239 const ::gpu::gles2::ContextCreationAttribHelper& attribs,
(...skipping 18 matching lines...) Expand all
258 gpu_preference, 258 gpu_preference,
259 service, 259 service,
260 gpu_memory_buffer_manager, 260 gpu_memory_buffer_manager,
261 image_factory)) 261 image_factory))
262 return NULL; 262 return NULL;
263 263
264 return context.release(); 264 return context.release();
265 } 265 }
266 266
267 } // namespace gpu 267 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698