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

Side by Side Diff: gpu/command_buffer/service/command_executor.h

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMAND_EXECUTOR_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMAND_EXECUTOR_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_COMMAND_EXECUTOR_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_COMMAND_EXECUTOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <queue> 11 #include <queue>
11 12
12 #include "base/atomic_ref_count.h" 13 #include "base/atomic_ref_count.h"
13 #include "base/atomicops.h" 14 #include "base/atomicops.h"
14 #include "base/callback.h" 15 #include "base/callback.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/linked_ptr.h" 17 #include "base/memory/linked_ptr.h"
17 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
18 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/shared_memory.h" 19 #include "base/memory/shared_memory.h"
20 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
21 #include "gpu/command_buffer/service/cmd_buffer_engine.h" 21 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
22 #include "gpu/command_buffer/service/cmd_parser.h" 22 #include "gpu/command_buffer/service/cmd_parser.h"
23 #include "gpu/command_buffer/service/command_buffer_service.h" 23 #include "gpu/command_buffer/service/command_buffer_service.h"
24 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 24 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
25 #include "gpu/gpu_export.h" 25 #include "gpu/gpu_export.h"
26 26
27 namespace gpu { 27 namespace gpu {
28 28
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 AsyncAPIInterface* handler_; 107 AsyncAPIInterface* handler_;
108 108
109 // Does not own decoder. TODO(apatrick): The CommandExecutor shouldn't need a 109 // Does not own decoder. TODO(apatrick): The CommandExecutor shouldn't need a
110 // pointer to the decoder, it is only used to initialize the CommandParser, 110 // pointer to the decoder, it is only used to initialize the CommandParser,
111 // which could be an argument to the constructor, and to determine the 111 // which could be an argument to the constructor, and to determine the
112 // reason for context lost. 112 // reason for context lost.
113 gles2::GLES2Decoder* decoder_; 113 gles2::GLES2Decoder* decoder_;
114 114
115 // TODO(apatrick): The CommandExecutor currently creates and owns the parser. 115 // TODO(apatrick): The CommandExecutor currently creates and owns the parser.
116 // This should be an argument to the constructor. 116 // This should be an argument to the constructor.
117 scoped_ptr<CommandParser> parser_; 117 std::unique_ptr<CommandParser> parser_;
118 118
119 // Whether the scheduler is currently able to process more commands. 119 // Whether the scheduler is currently able to process more commands.
120 bool scheduled_; 120 bool scheduled_;
121 121
122 base::Closure command_processed_callback_; 122 base::Closure command_processed_callback_;
123 123
124 // If non-NULL and |preemption_flag_->IsSet()|, exit PutChanged early. 124 // If non-NULL and |preemption_flag_->IsSet()|, exit PutChanged early.
125 scoped_refptr<PreemptionFlag> preemption_flag_; 125 scoped_refptr<PreemptionFlag> preemption_flag_;
126 bool was_preempted_; 126 bool was_preempted_;
127 127
128 DISALLOW_COPY_AND_ASSIGN(CommandExecutor); 128 DISALLOW_COPY_AND_ASSIGN(CommandExecutor);
129 }; 129 };
130 130
131 } // namespace gpu 131 } // namespace gpu
132 132
133 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_EXECUTOR_H_ 133 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_EXECUTOR_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/command_buffer_service_unittest.cc ('k') | gpu/command_buffer/service/command_executor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698