| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "webkit/tools/pepper_test_plugin/command_buffer_pepper.h" | 5 #include "webkit/tools/pepper_test_plugin/command_buffer_pepper.h" |
| 6 #include "base/logging.h" |
| 6 | 7 |
| 7 using base::SharedMemory; | 8 using base::SharedMemory; |
| 8 using gpu::Buffer; | 9 using gpu::Buffer; |
| 9 | 10 |
| 10 CommandBufferPepper::CommandBufferPepper(NPP npp, NPNetscapeFuncs* browser) | 11 CommandBufferPepper::CommandBufferPepper(NPP npp, NPNetscapeFuncs* browser) |
| 11 : npp_(npp), | 12 : npp_(npp), |
| 12 browser_(browser), | 13 browser_(browser), |
| 13 extensions_(NULL), | 14 extensions_(NULL), |
| 14 device_(NULL) { | 15 device_(NULL) { |
| 15 } | 16 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 npp_, | 90 npp_, |
| 90 &context_, | 91 &context_, |
| 91 NPDeviceContext3DState_PutOffset, | 92 NPDeviceContext3DState_PutOffset, |
| 92 &value)) { | 93 &value)) { |
| 93 return -1; | 94 return -1; |
| 94 } | 95 } |
| 95 | 96 |
| 96 return value; | 97 return value; |
| 97 } | 98 } |
| 98 | 99 |
| 99 void CommandBufferPepper::SetPutOffsetChangeCallback( | |
| 100 Callback0::Type* callback) { | |
| 101 // Not implemented by proxy. | |
| 102 NOTREACHED(); | |
| 103 } | |
| 104 | |
| 105 int32 CommandBufferPepper::CreateTransferBuffer(size_t size) { | 100 int32 CommandBufferPepper::CreateTransferBuffer(size_t size) { |
| 106 int32 id; | 101 int32 id; |
| 107 if (NPERR_NO_ERROR != device_->createBuffer(npp_, &context_, size, &id)) | 102 if (NPERR_NO_ERROR != device_->createBuffer(npp_, &context_, size, &id)) |
| 108 return -1; | 103 return -1; |
| 109 | 104 |
| 110 return id; | 105 return id; |
| 111 } | 106 } |
| 112 | 107 |
| 113 void CommandBufferPepper::DestroyTransferBuffer(int32 id) { | 108 void CommandBufferPepper::DestroyTransferBuffer(int32 id) { |
| 114 device_->destroyBuffer(npp_, &context_, id); | 109 device_->destroyBuffer(npp_, &context_, id); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 return value != 0; | 166 return value != 0; |
| 172 } | 167 } |
| 173 | 168 |
| 174 return true; | 169 return true; |
| 175 } | 170 } |
| 176 | 171 |
| 177 void CommandBufferPepper::RaiseErrorStatus() { | 172 void CommandBufferPepper::RaiseErrorStatus() { |
| 178 // Not implemented by proxy. | 173 // Not implemented by proxy. |
| 179 NOTREACHED(); | 174 NOTREACHED(); |
| 180 } | 175 } |
| OLD | NEW |