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

Side by Side Diff: o3d/gpu_plugin/gpu_plugin_object.cc

Issue 234001: GPUProcessor uses O3D command buffer service to render to a window.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « o3d/gpu_plugin/gpu_plugin.gyp ('k') | o3d/gpu_plugin/gpu_plugin_object_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "o3d/gpu_plugin/np_utils/np_utils.h" 8 #include "o3d/gpu_plugin/np_utils/np_utils.h"
9 #include "o3d/gpu_plugin/gpu_plugin_object.h" 9 #include "o3d/gpu_plugin/gpu_plugin_object.h"
10 #include "o3d/gpu_plugin/gpu_processor.h" 10 #include "o3d/gpu_plugin/gpu_processor.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 NPBrowser::get()->RetainObject(this); 82 NPBrowser::get()->RetainObject(this);
83 return this; 83 return this;
84 } 84 }
85 85
86 NPObjectPointer<NPObject> GPUPluginObject::OpenCommandBuffer() { 86 NPObjectPointer<NPObject> GPUPluginObject::OpenCommandBuffer() {
87 if (command_buffer_.Get()) 87 if (command_buffer_.Get())
88 return command_buffer_; 88 return command_buffer_;
89 89
90 command_buffer_ = NPCreateObject<CommandBuffer>(npp_); 90 command_buffer_ = NPCreateObject<CommandBuffer>(npp_);
91 if (command_buffer_->Initialize(kCommandBufferSize)) { 91 if (command_buffer_->Initialize(kCommandBufferSize)) {
92 processor_ = new GPUProcessor(command_buffer_); 92 processor_ = new GPUProcessor(npp_, command_buffer_);
93 command_buffer_->SetPutOffsetChangeCallback( 93 if (processor_->Initialize(static_cast<HWND>(window_.window))) {
94 NewCallback(processor_.get(), 94 command_buffer_->SetPutOffsetChangeCallback(
95 &GPUProcessor::ProcessCommands)); 95 NewCallback(processor_.get(),
96 UpdateProcessorWindow(); 96 &GPUProcessor::ProcessCommands));
97 return command_buffer_; 97 UpdateProcessorWindow();
98 return command_buffer_;
99 }
98 } 100 }
99 101
102 processor_ = NULL;
100 command_buffer_ = NPObjectPointer<CommandBuffer>(); 103 command_buffer_ = NPObjectPointer<CommandBuffer>();
101 return command_buffer_; 104 return command_buffer_;
102 } 105 }
103 106
104 } // namespace gpu_plugin 107 } // namespace gpu_plugin
105 } // namespace o3d 108 } // namespace o3d
OLDNEW
« no previous file with comments | « o3d/gpu_plugin/gpu_plugin.gyp ('k') | o3d/gpu_plugin/gpu_plugin_object_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698