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

Side by Side Diff: ppapi/shared_impl/ppb_graphics_3d_shared.cc

Issue 10909244: PPAPI: Get TrackedCallback ready for running on non-main threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged. Created 8 years, 1 month 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/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/transfer_buffer.h" 10 #include "gpu/command_buffer/client/transfer_buffer.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 target, level, xoffset, yoffset, width, height, format, type, access); 82 target, level, xoffset, yoffset, width, height, format, type, access);
83 } 83 }
84 84
85 void PPB_Graphics3D_Shared::UnmapTexSubImage2DCHROMIUM(const void* mem) { 85 void PPB_Graphics3D_Shared::UnmapTexSubImage2DCHROMIUM(const void* mem) {
86 ScopedNoLocking already_locked(this); 86 ScopedNoLocking already_locked(this);
87 gles2_impl_->UnmapTexSubImage2DCHROMIUM(mem); 87 gles2_impl_->UnmapTexSubImage2DCHROMIUM(mem);
88 } 88 }
89 89
90 void PPB_Graphics3D_Shared::SwapBuffersACK(int32_t pp_error) { 90 void PPB_Graphics3D_Shared::SwapBuffersACK(int32_t pp_error) {
91 DCHECK(HasPendingSwap()); 91 DCHECK(HasPendingSwap());
92 TrackedCallback::ClearAndRun(&swap_callback_, pp_error); 92 swap_callback_->Run(pp_error);
93 } 93 }
94 94
95 bool PPB_Graphics3D_Shared::HasPendingSwap() const { 95 bool PPB_Graphics3D_Shared::HasPendingSwap() const {
96 return TrackedCallback::IsPending(swap_callback_); 96 return TrackedCallback::IsPending(swap_callback_);
97 } 97 }
98 98
99 bool PPB_Graphics3D_Shared::CreateGLES2Impl( 99 bool PPB_Graphics3D_Shared::CreateGLES2Impl(
100 int32 command_buffer_size, 100 int32 command_buffer_size,
101 int32 transfer_buffer_size, 101 int32 transfer_buffer_size,
102 gpu::gles2::GLES2Implementation* share_gles2) { 102 gpu::gles2::GLES2Implementation* share_gles2) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void PPB_Graphics3D_Shared::PushAlreadyLocked() { 145 void PPB_Graphics3D_Shared::PushAlreadyLocked() {
146 // Do nothing. This should be overridden in the plugin side. 146 // Do nothing. This should be overridden in the plugin side.
147 } 147 }
148 148
149 void PPB_Graphics3D_Shared::PopAlreadyLocked() { 149 void PPB_Graphics3D_Shared::PopAlreadyLocked() {
150 // Do nothing. This should be overridden in the plugin side. 150 // Do nothing. This should be overridden in the plugin side.
151 } 151 }
152 152
153 } // namespace ppapi 153 } // namespace ppapi
154 154
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_audio_input_shared.cc ('k') | ppapi/shared_impl/ppb_video_capture_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698