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

Unified Diff: gpu/command_buffer/service/gpu_processor_win.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_unittest.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_processor_win.cc
===================================================================
--- gpu/command_buffer/service/gpu_processor_win.cc (revision 35153)
+++ gpu/command_buffer/service/gpu_processor_win.cc (working copy)
@@ -37,19 +37,17 @@
return false;
// Map the ring buffer and create the parser.
- ::base::SharedMemory* ring_buffer = command_buffer_->GetRingBuffer();
- if (ring_buffer) {
- size_t size = ring_buffer->max_size();
- if (!ring_buffer->Map(size)) {
- return false;
- }
-
- void* ptr = ring_buffer->memory();
- parser_.reset(new gpu::CommandParser(ptr, size, 0, size, 0,
- decoder_.get()));
+ Buffer ring_buffer = command_buffer_->GetRingBuffer();
+ if (ring_buffer.ptr) {
+ parser_.reset(new CommandParser(ring_buffer.ptr,
+ ring_buffer.size,
+ 0,
+ ring_buffer.size,
+ 0,
+ decoder_.get()));
} else {
- parser_.reset(new gpu::CommandParser(NULL, 0, 0, 0, 0,
- decoder_.get()));
+ parser_.reset(new CommandParser(NULL, 0, 0, 0, 0,
+ decoder_.get()));
}
// Initialize GAPI immediately if the window handle is valid.
@@ -64,17 +62,4 @@
decoder_->set_hwnd(NULL);
}
}
-
-bool GPUProcessor::SetWindow(gfx::PluginWindowHandle handle,
- int width,
- int height) {
- if (handle == NULL) {
- // Destroy GAPI when the window handle becomes invalid.
- Destroy();
- return true;
- } else {
- return Initialize(handle);
- }
-}
-
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/gpu_processor_unittest.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698