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

Side by Side Diff: gpu/command_buffer/service/common_decoder.cc

Issue 465040: Added CommandBufferClient, CommandBufferStub and some IPC messages.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 15 matching lines...) Expand all
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #include "gpu/command_buffer/service/precompile.h" 32 #include "gpu/command_buffer/service/precompile.h"
33 #include "gpu/command_buffer/service/common_decoder.h" 33 #include "gpu/command_buffer/service/common_decoder.h"
34 #include "gpu/command_buffer/service/cmd_buffer_engine.h" 34 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
35 35
36 namespace command_buffer { 36 namespace gpu {
37 37
38 const void* CommonDecoder::Bucket::GetData(size_t offset, size_t size) const { 38 const void* CommonDecoder::Bucket::GetData(size_t offset, size_t size) const {
39 if (OffsetSizeValid(offset, size)) { 39 if (OffsetSizeValid(offset, size)) {
40 return data_.get() + offset; 40 return data_.get() + offset;
41 } 41 }
42 return NULL; 42 return NULL;
43 } 43 }
44 44
45 void CommonDecoder::Bucket::SetSize(size_t size) { 45 void CommonDecoder::Bucket::SetSize(size_t size) {
46 if (size != size_) { 46 if (size != size_) {
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 return parse_error::kParseInvalidArguments; 288 return parse_error::kParseInvalidArguments;
289 } 289 }
290 const void* src = bucket->GetData(offset, size); 290 const void* src = bucket->GetData(offset, size);
291 if (!src) { 291 if (!src) {
292 return parse_error::kParseInvalidArguments; 292 return parse_error::kParseInvalidArguments;
293 } 293 }
294 memcpy(data, src, size); 294 memcpy(data, src, size);
295 return parse_error::kParseNoError; 295 return parse_error::kParseNoError;
296 } 296 }
297 297
298 } // namespace command_buffer 298 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/common_decoder.h ('k') | gpu/command_buffer/service/common_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698