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

Unified Diff: gpu/command_buffer/service/common_decoder.cc

Issue 367002: Added Pepper 3D render context that instantiates the GPU plugin.... (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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/common_decoder.cc
===================================================================
--- gpu/command_buffer/service/common_decoder.cc (revision 35153)
+++ gpu/command_buffer/service/common_decoder.cc (working copy)
@@ -35,14 +35,14 @@
void* CommonDecoder::GetAddressAndCheckSize(unsigned int shm_id,
unsigned int offset,
unsigned int size) {
- void* shm_addr = engine_->GetSharedMemoryAddress(shm_id);
- if (!shm_addr) return NULL;
- size_t shm_size = engine_->GetSharedMemorySize(shm_id);
+ Buffer buffer = engine_->GetSharedMemoryBuffer(shm_id);
+ if (!buffer.ptr)
+ return NULL;
unsigned int end = offset + size;
- if (end > shm_size || end < offset) {
+ if (end > buffer.size || end < offset) {
return NULL;
}
- return static_cast<int8 *>(shm_addr) + offset;
+ return static_cast<int8*>(buffer.ptr) + offset;
}
const char* CommonDecoder::GetCommonCommandName(
« no previous file with comments | « gpu/command_buffer/service/command_buffer_service_unittest.cc ('k') | gpu/command_buffer/service/common_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698