OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "gpu/command_buffer/service/gpu_processor.h" |
| 6 |
| 7 using ::base::SharedMemory; |
| 8 |
| 9 namespace gpu { |
| 10 |
| 11 bool GPUProcessor::Initialize(gfx::PluginWindowHandle handle) { |
| 12 // At this level we do not need the PluginWindowHandle. It is only |
| 13 // needed at the CommandBufferStub level to identify which GPU |
| 14 // plugin instance is creating a new backing store in response to a |
| 15 // resize event. |
| 16 |
| 17 // Map the ring buffer and create the parser. |
| 18 Buffer ring_buffer = command_buffer_->GetRingBuffer(); |
| 19 if (ring_buffer.ptr) { |
| 20 parser_.reset(new CommandParser(ring_buffer.ptr, |
| 21 ring_buffer.size, |
| 22 0, |
| 23 ring_buffer.size, |
| 24 0, |
| 25 decoder_.get())); |
| 26 } else { |
| 27 parser_.reset(new CommandParser(NULL, 0, 0, 0, 0, |
| 28 decoder_.get())); |
| 29 } |
| 30 |
| 31 // Initialize GAPI. |
| 32 return decoder_->Initialize(); |
| 33 } |
| 34 |
| 35 void GPUProcessor::Destroy() { |
| 36 decoder_->Destroy(); |
| 37 } |
| 38 } // namespace gpu |
| 39 |
OLD | NEW |