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

Side by Side Diff: ppapi/shared_impl/ppb_graphics_3d_shared.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
« no previous file with comments | « mojo/gles2/gles2_context.cc ('k') | ui/compositor/test/in_process_context_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/shared_impl/ppb_graphics_3d_shared.h" 5 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
9 #include "gpu/command_buffer/client/gles2_implementation.h" 9 #include "gpu/command_buffer/client/gles2_implementation.h"
10 #include "gpu/command_buffer/client/shared_memory_limits.h"
10 #include "gpu/command_buffer/client/transfer_buffer.h" 11 #include "gpu/command_buffer/client/transfer_buffer.h"
11 #include "gpu/command_buffer/common/sync_token.h" 12 #include "gpu/command_buffer/common/sync_token.h"
12 #include "ppapi/c/pp_errors.h" 13 #include "ppapi/c/pp_errors.h"
13 14
14 namespace ppapi { 15 namespace ppapi {
15 16
16 PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(PP_Instance instance) 17 PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(PP_Instance instance)
17 : Resource(OBJECT_IS_IMPL, instance) {} 18 : Resource(OBJECT_IS_IMPL, instance) {}
18 19
19 PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(const HostResource& host_resource) 20 PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(const HostResource& host_resource)
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 gles2_impl_.reset(new gpu::gles2::GLES2Implementation( 137 gles2_impl_.reset(new gpu::gles2::GLES2Implementation(
137 gles2_helper_.get(), 138 gles2_helper_.get(),
138 share_gles2 ? share_gles2->share_group() : NULL, 139 share_gles2 ? share_gles2->share_group() : NULL,
139 transfer_buffer_.get(), 140 transfer_buffer_.get(),
140 bind_creates_resources, 141 bind_creates_resources,
141 lose_context_when_out_of_memory, 142 lose_context_when_out_of_memory,
142 support_client_side_arrays, 143 support_client_side_arrays,
143 GetGpuControl())); 144 GetGpuControl()));
144 145
145 if (!gles2_impl_->Initialize( 146 if (!gles2_impl_->Initialize(
146 transfer_buffer_size, 147 transfer_buffer_size, kMinTransferBufferSize,
147 kMinTransferBufferSize, 148 std::max(kMaxTransferBufferSize, transfer_buffer_size),
148 std::max(kMaxTransferBufferSize, transfer_buffer_size), 149 gpu::SharedMemoryLimits::kNoLimit)) {
149 gpu::gles2::GLES2Implementation::kNoLimit)) {
150 return false; 150 return false;
151 } 151 }
152 152
153 gles2_impl_->TraceBeginCHROMIUM("gpu_toplevel", "PPAPIContext"); 153 gles2_impl_->TraceBeginCHROMIUM("gpu_toplevel", "PPAPIContext");
154 154
155 return true; 155 return true;
156 } 156 }
157 157
158 void PPB_Graphics3D_Shared::DestroyGLES2Impl() { 158 void PPB_Graphics3D_Shared::DestroyGLES2Impl() {
159 gles2_impl_.reset(); 159 gles2_impl_.reset();
160 transfer_buffer_.reset(); 160 transfer_buffer_.reset();
161 gles2_helper_.reset(); 161 gles2_helper_.reset();
162 } 162 }
163 163
164 } // namespace ppapi 164 } // namespace ppapi
OLDNEW
« no previous file with comments | « mojo/gles2/gles2_context.cc ('k') | ui/compositor/test/in_process_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698