summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/gpu_processor.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-05 03:07:07 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-05 03:07:07 +0000
commit4049046a39cb364577a1ac8a2aac47a86afc5b7b (patch)
treee670e88f432ee925b7b89994eff756052739af60 /gpu/command_buffer/service/gpu_processor.cc
parent07a174f4c159a347c6d7e10a5f3da2d5966c92d1 (diff)
downloadchromium_src-4049046a39cb364577a1ac8a2aac47a86afc5b7b.zip
chromium_src-4049046a39cb364577a1ac8a2aac47a86afc5b7b.tar.gz
chromium_src-4049046a39cb364577a1ac8a2aac47a86afc5b7b.tar.bz2
linux: implement gpu plugin
Review URL: http://codereview.chromium.org/500132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/gpu_processor.cc')
-rw-r--r--gpu/command_buffer/service/gpu_processor.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gpu_processor.cc b/gpu/command_buffer/service/gpu_processor.cc
index 0968215..c095341 100644
--- a/gpu/command_buffer/service/gpu_processor.cc
+++ b/gpu/command_buffer/service/gpu_processor.cc
@@ -9,6 +9,25 @@ using ::base::SharedMemory;
namespace gpu {
+GPUProcessor::GPUProcessor(CommandBuffer* command_buffer)
+ : command_buffer_(command_buffer),
+ commands_per_update_(100) {
+ DCHECK(command_buffer);
+ decoder_.reset(gles2::GLES2Decoder::Create());
+ decoder_->set_engine(this);
+}
+
+GPUProcessor::GPUProcessor(CommandBuffer* command_buffer,
+ gles2::GLES2Decoder* decoder,
+ CommandParser* parser,
+ int commands_per_update)
+ : command_buffer_(command_buffer),
+ commands_per_update_(commands_per_update) {
+ DCHECK(command_buffer);
+ decoder_.reset(decoder);
+ parser_.reset(parser);
+}
+
GPUProcessor::~GPUProcessor() {
}
@@ -32,6 +51,8 @@ void GPUProcessor::ProcessCommands() {
command_buffer_->SetParseError(parse_error);
command_buffer_->RaiseErrorStatus();
return;
+ case gpu::parse_error::kParseNoError:
+ break;
}
++commands_processed;