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

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

Issue 1136006: Calling OpenGL from the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
Index: gpu/command_buffer/service/gpu_processor_mac.cc
===================================================================
--- gpu/command_buffer/service/gpu_processor_mac.cc (revision 42644)
+++ gpu/command_buffer/service/gpu_processor_mac.cc (working copy)
@@ -8,7 +8,10 @@
namespace gpu {
-bool GPUProcessor::Initialize(gfx::PluginWindowHandle handle) {
+bool GPUProcessor::Initialize(gfx::PluginWindowHandle handle,
+ GPUProcessor* parent,
+ const gfx::Size& size,
+ uint32 parent_texture_id) {
// At this level we do not need the PluginWindowHandle. It is only
// needed at the CommandBufferStub level to identify which GPU
// plugin instance is creating a new backing store in response to a
@@ -29,11 +32,25 @@
}
// Initialize GAPI.
- return decoder_->Initialize();
+ gles2::GLES2Decoder* parent_decoder = parent ? parent->decoder_.get() : NULL;
+ if (!decoder_->Initialize(parent_decoder,
+ size,
+ parent_texture_id)) {
+ Destroy();
+ return false;
+ }
+
+ return true;
}
void GPUProcessor::Destroy() {
- decoder_->Destroy();
+ // Destroy decoder if initialized.
+ if (decoder_.get()) {
+ decoder_->Destroy();
+ decoder_.reset();
+ }
+
+ parser_.reset();
}
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/gpu_processor_linux.cc ('k') | gpu/command_buffer/service/gpu_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698