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

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

Issue 2012533004: Add generated and hand-written passthrough command handlers with stub Doers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/common_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/common_decoder.cc
diff --git a/gpu/command_buffer/service/common_decoder.cc b/gpu/command_buffer/service/common_decoder.cc
index 27ba05b2482af7cd89d3d36440bd97440a23508b..634932102314e1d5ee38075b29ab5ed9b03e6fa5 100644
--- a/gpu/command_buffer/service/common_decoder.cc
+++ b/gpu/command_buffer/service/common_decoder.cc
@@ -137,6 +137,25 @@ void* CommonDecoder::GetAddressAndCheckSize(unsigned int shm_id,
return buffer->GetDataAddress(data_offset, data_size);
}
+void* CommonDecoder::GetAddressAndSize(unsigned int shm_id,
+ unsigned int data_offset,
+ unsigned int* data_size) {
+ CHECK(engine_);
+ scoped_refptr<gpu::Buffer> buffer = engine_->GetSharedMemoryBuffer(shm_id);
+ if (!buffer.get())
+ return NULL;
+ return buffer->GetDataAddressAndSize(data_offset, data_size);
+}
+
+unsigned int CommonDecoder::GetSharedMemorySize(unsigned int shm_id,
+ unsigned int offset) {
+ CHECK(engine_);
+ scoped_refptr<gpu::Buffer> buffer = engine_->GetSharedMemoryBuffer(shm_id);
+ if (!buffer.get())
+ return 0;
+ return buffer->GetRemainingSize(offset);
+}
+
scoped_refptr<gpu::Buffer> CommonDecoder::GetSharedMemoryBuffer(
unsigned int shm_id) {
return engine_->GetSharedMemoryBuffer(shm_id);
« no previous file with comments | « gpu/command_buffer/service/common_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698