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

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

Issue 7763007: Make PPB_GLESChromiumTextureMapping_Dev work with PPB_Graphics3D_Dev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/graphics_3d_impl.h" 5 #include "ppapi/shared_impl/graphics_3d_impl.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 "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 if (HasPendingSwap()) { 52 if (HasPendingSwap()) {
53 // Already a pending SwapBuffers that hasn't returned yet. 53 // Already a pending SwapBuffers that hasn't returned yet.
54 return PP_ERROR_INPROGRESS; 54 return PP_ERROR_INPROGRESS;
55 } 55 }
56 56
57 swap_callback_ = callback; 57 swap_callback_ = callback;
58 return DoSwapBuffers(); 58 return DoSwapBuffers();
59 } 59 }
60 60
61 void* Graphics3DImpl::MapTexSubImage2DCHROMIUM(GLenum target,
62 GLint level,
63 GLint xoffset,
64 GLint yoffset,
65 GLsizei width,
66 GLsizei height,
67 GLenum format,
68 GLenum type,
69 GLenum access) {
70 return gles2_impl_->MapTexSubImage2DCHROMIUM(
71 target, level, xoffset, yoffset, width, height, format, type, access);
72 }
73
74 void Graphics3DImpl::UnmapTexSubImage2DCHROMIUM(const void* mem) {
75 gles2_impl_->UnmapTexSubImage2DCHROMIUM(mem);
76 }
77
61 void Graphics3DImpl::SwapBuffersACK(int32_t pp_error) { 78 void Graphics3DImpl::SwapBuffersACK(int32_t pp_error) {
62 DCHECK(HasPendingSwap()); 79 DCHECK(HasPendingSwap());
63 PP_RunAndClearCompletionCallback(&swap_callback_, pp_error); 80 PP_RunAndClearCompletionCallback(&swap_callback_, pp_error);
64 } 81 }
65 82
66 bool Graphics3DImpl::CreateGLES2Impl(int32 command_buffer_size, 83 bool Graphics3DImpl::CreateGLES2Impl(int32 command_buffer_size,
67 int32 transfer_buffer_size) { 84 int32 transfer_buffer_size) {
68 gpu::CommandBuffer* command_buffer = GetCommandBuffer(); 85 gpu::CommandBuffer* command_buffer = GetCommandBuffer();
69 DCHECK(command_buffer); 86 DCHECK(command_buffer);
70 87
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 DCHECK(command_buffer); 123 DCHECK(command_buffer);
107 command_buffer->DestroyTransferBuffer(transfer_buffer_id_); 124 command_buffer->DestroyTransferBuffer(transfer_buffer_id_);
108 transfer_buffer_id_ = -1; 125 transfer_buffer_id_ = -1;
109 } 126 }
110 127
111 gles2_helper_.reset(); 128 gles2_helper_.reset();
112 } 129 }
113 130
114 } // namespace ppapi 131 } // namespace ppapi
115 132
OLDNEW
« no previous file with comments | « ppapi/shared_impl/graphics_3d_impl.h ('k') | ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698