OLD | NEW |
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 15 matching lines...) Expand all Loading... |
26 int32_t Graphics3DImpl::GetAttribs(int32_t* attrib_list) { | 26 int32_t Graphics3DImpl::GetAttribs(int32_t* attrib_list) { |
27 // TODO(alokp): Implement me. | 27 // TODO(alokp): Implement me. |
28 return PP_ERROR_FAILED; | 28 return PP_ERROR_FAILED; |
29 } | 29 } |
30 | 30 |
31 int32_t Graphics3DImpl::SetAttribs(int32_t* attrib_list) { | 31 int32_t Graphics3DImpl::SetAttribs(int32_t* attrib_list) { |
32 // TODO(alokp): Implement me. | 32 // TODO(alokp): Implement me. |
33 return PP_ERROR_FAILED; | 33 return PP_ERROR_FAILED; |
34 } | 34 } |
35 | 35 |
| 36 int32_t Graphics3DImpl::GetError() { |
| 37 // TODO(alokp): Implement me. |
| 38 return PP_ERROR_FAILED; |
| 39 } |
| 40 |
36 int32_t Graphics3DImpl::ResizeBuffers(int32_t width, int32_t height) { | 41 int32_t Graphics3DImpl::ResizeBuffers(int32_t width, int32_t height) { |
37 if ((width < 0) || (height < 0)) | 42 if ((width < 0) || (height < 0)) |
38 return PP_ERROR_BADARGUMENT; | 43 return PP_ERROR_BADARGUMENT; |
39 | 44 |
40 gles2_impl()->ResizeCHROMIUM(width, height); | 45 gles2_impl()->ResizeCHROMIUM(width, height); |
41 // TODO(alokp): Check if resize succeeded and return appropriate error code. | 46 // TODO(alokp): Check if resize succeeded and return appropriate error code. |
42 return PP_OK; | 47 return PP_OK; |
43 } | 48 } |
44 | 49 |
45 int32_t Graphics3DImpl::SwapBuffers(PP_CompletionCallback callback) { | 50 int32_t Graphics3DImpl::SwapBuffers(PP_CompletionCallback callback) { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 DCHECK(command_buffer); | 128 DCHECK(command_buffer); |
124 command_buffer->DestroyTransferBuffer(transfer_buffer_id_); | 129 command_buffer->DestroyTransferBuffer(transfer_buffer_id_); |
125 transfer_buffer_id_ = -1; | 130 transfer_buffer_id_ = -1; |
126 } | 131 } |
127 | 132 |
128 gles2_helper_.reset(); | 133 gles2_helper_.reset(); |
129 } | 134 } |
130 | 135 |
131 } // namespace ppapi | 136 } // namespace ppapi |
132 | 137 |
OLD | NEW |