OLD | NEW |
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 <windows.h> | 5 #include <windows.h> |
6 | 6 |
7 #include "o3d/gpu_plugin/gpu_processor.h" | 7 #include "o3d/gpu_plugin/gpu_processor.h" |
8 | 8 |
9 namespace o3d { | 9 namespace o3d { |
10 namespace gpu_plugin { | 10 namespace gpu_plugin { |
11 | 11 |
12 GPUProcessor::GPUProcessor(NPP npp, | 12 GPUProcessor::GPUProcessor(NPP npp, |
13 CommandBuffer* command_buffer) | 13 CommandBuffer* command_buffer) |
14 : npp_(npp), | 14 : npp_(npp), |
15 command_buffer_(command_buffer), | 15 command_buffer_(command_buffer), |
16 commands_per_update_(100) { | 16 commands_per_update_(100) { |
17 DCHECK(command_buffer); | 17 DCHECK(command_buffer); |
18 gapi_.reset(new GPUGAPIInterface); | 18 gapi_.reset(new GPUGAPIInterface); |
19 decoder_.reset(new command_buffer::GAPIDecoder(gapi_.get())); | 19 decoder_.reset(new command_buffer::o3d::GAPIDecoder(gapi_.get())); |
20 decoder_->set_engine(this); | 20 decoder_->set_engine(this); |
21 } | 21 } |
22 | 22 |
23 GPUProcessor::GPUProcessor(NPP npp, | 23 GPUProcessor::GPUProcessor(NPP npp, |
24 CommandBuffer* command_buffer, | 24 CommandBuffer* command_buffer, |
25 GPUGAPIInterface* gapi, | 25 GPUGAPIInterface* gapi, |
26 command_buffer::GAPIDecoder* decoder, | 26 command_buffer::o3d::GAPIDecoder* decoder, |
27 command_buffer::CommandParser* parser, | 27 command_buffer::CommandParser* parser, |
28 int commands_per_update) | 28 int commands_per_update) |
29 : npp_(npp), | 29 : npp_(npp), |
30 command_buffer_(command_buffer), | 30 command_buffer_(command_buffer), |
31 commands_per_update_(commands_per_update) { | 31 commands_per_update_(commands_per_update) { |
32 DCHECK(command_buffer); | 32 DCHECK(command_buffer); |
33 gapi_.reset(gapi); | 33 gapi_.reset(gapi); |
34 decoder_.reset(decoder); | 34 decoder_.reset(decoder); |
35 parser_.reset(parser); | 35 parser_.reset(parser); |
36 } | 36 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // Destroy GAPI when the window handle becomes invalid. | 80 // Destroy GAPI when the window handle becomes invalid. |
81 Destroy(); | 81 Destroy(); |
82 return true; | 82 return true; |
83 } else { | 83 } else { |
84 return Initialize(handle); | 84 return Initialize(handle); |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 } // namespace gpu_plugin | 88 } // namespace gpu_plugin |
89 } // namespace o3d | 89 } // namespace o3d |
OLD | NEW |