| OLD | NEW |
| 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 Loading... |
| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |