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

Side by Side Diff: ppapi/proxy/ppb_graphics_3d_proxy.cc

Issue 24925002: Move Insert/SignalSyncPoint() to GpuControl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
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/proxy/ppb_graphics_3d_proxy.h" 5 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 #include "gpu/command_buffer/common/command_buffer.h" 8 #include "gpu/command_buffer/common/command_buffer.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/proxy/enter_proxy.h" 10 #include "ppapi/proxy/enter_proxy.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 virtual void SetParseError(gpu::error::Error error) OVERRIDE { 159 virtual void SetParseError(gpu::error::Error error) OVERRIDE {
160 MaybeLock lock(need_to_lock_); 160 MaybeLock lock(need_to_lock_);
161 gpu_command_buffer_->SetParseError(error); 161 gpu_command_buffer_->SetParseError(error);
162 } 162 }
163 virtual void SetContextLostReason( 163 virtual void SetContextLostReason(
164 gpu::error::ContextLostReason reason) OVERRIDE { 164 gpu::error::ContextLostReason reason) OVERRIDE {
165 MaybeLock lock(need_to_lock_); 165 MaybeLock lock(need_to_lock_);
166 gpu_command_buffer_->SetContextLostReason(reason); 166 gpu_command_buffer_->SetContextLostReason(reason);
167 } 167 }
168 virtual uint32 InsertSyncPoint() OVERRIDE {
169 MaybeLock lock(need_to_lock_);
170 return gpu_command_buffer_->InsertSyncPoint();
171 }
172 168
173 // Weak pointer - see class Graphics3D for the scopted_ptr. 169 // Weak pointer - see class Graphics3D for the scopted_ptr.
174 gpu::CommandBuffer* gpu_command_buffer_; 170 gpu::CommandBuffer* gpu_command_buffer_;
175 171
176 bool need_to_lock_; 172 bool need_to_lock_;
177 }; 173 };
178 174
179 Graphics3D::Graphics3D(const HostResource& resource) 175 Graphics3D::Graphics3D(const HostResource& resource)
180 : PPB_Graphics3D_Shared(resource), 176 : PPB_Graphics3D_Shared(resource),
181 num_already_locked_calls_(0) { 177 num_already_locked_calls_(0) {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 int32_t result, 499 int32_t result,
504 const HostResource& context) { 500 const HostResource& context) {
505 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( 501 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK(
506 API_ID_PPB_GRAPHICS_3D, context, result)); 502 API_ID_PPB_GRAPHICS_3D, context, result));
507 } 503 }
508 #endif // !defined(OS_NACL) 504 #endif // !defined(OS_NACL)
509 505
510 } // namespace proxy 506 } // namespace proxy
511 } // namespace ppapi 507 } // namespace ppapi
512 508
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698