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

Unified Diff: gpu/command_buffer/service/gpu_processor.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
« no previous file with comments | « gpu/command_buffer/service/gpu_processor.h ('k') | gpu/command_buffer/service/gpu_processor_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_processor.cc
===================================================================
--- gpu/command_buffer/service/gpu_processor.cc (revision 35153)
+++ gpu/command_buffer/service/gpu_processor.cc (working copy)
@@ -20,16 +20,15 @@
int commands_processed = 0;
while (commands_processed < commands_per_update_ && !parser_->IsEmpty()) {
- gpu::parse_error::ParseError parse_error =
- parser_->ProcessCommand();
+ parse_error::ParseError parse_error = parser_->ProcessCommand();
switch (parse_error) {
- case gpu::parse_error::kParseUnknownCommand:
- case gpu::parse_error::kParseInvalidArguments:
+ case parse_error::kParseUnknownCommand:
+ case parse_error::kParseInvalidArguments:
command_buffer_->SetParseError(parse_error);
break;
- case gpu::parse_error::kParseInvalidSize:
- case gpu::parse_error::kParseOutOfBounds:
+ case parse_error::kParseInvalidSize:
+ case parse_error::kParseOutOfBounds:
command_buffer_->SetParseError(parse_error);
command_buffer_->RaiseErrorStatus();
return;
@@ -46,31 +45,10 @@
}
}
-void *GPUProcessor::GetSharedMemoryAddress(int32 shm_id) {
- ::base::SharedMemory* shared_memory =
- command_buffer_->GetTransferBuffer(shm_id);
- if (!shared_memory)
- return NULL;
-
- if (!shared_memory->memory()) {
- if (!shared_memory->Map(shared_memory->max_size()))
- return NULL;
- }
-
- return shared_memory->memory();
+Buffer GPUProcessor::GetSharedMemoryBuffer(int32 shm_id) {
+ return command_buffer_->GetTransferBuffer(shm_id);
}
-// TODO(apatrick): Consolidate this with the above and return both the address
-// and size.
-size_t GPUProcessor::GetSharedMemorySize(int32 shm_id) {
- ::base::SharedMemory* shared_memory =
- command_buffer_->GetTransferBuffer(shm_id);
- if (!shared_memory)
- return 0;
-
- return shared_memory->max_size();
-}
-
void GPUProcessor::set_token(int32 token) {
command_buffer_->SetToken(token);
}
« no previous file with comments | « gpu/command_buffer/service/gpu_processor.h ('k') | gpu/command_buffer/service/gpu_processor_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698