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

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

Issue 1348363003: content/gpu: Simplify stub scheduling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu_channel_stream
Patch Set: address comments Created 5 years, 3 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_GPU_SCHEDULER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/atomic_ref_count.h" 10 #include "base/atomic_ref_count.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // reason for context lost. 119 // reason for context lost.
120 gles2::GLES2Decoder* decoder_; 120 gles2::GLES2Decoder* decoder_;
121 121
122 // TODO(apatrick): The GpuScheduler currently creates and owns the parser. 122 // TODO(apatrick): The GpuScheduler currently creates and owns the parser.
123 // This should be an argument to the constructor. 123 // This should be an argument to the constructor.
124 scoped_ptr<CommandParser> parser_; 124 scoped_ptr<CommandParser> parser_;
125 125
126 // Greater than zero if this is waiting to be rescheduled before continuing. 126 // Greater than zero if this is waiting to be rescheduled before continuing.
127 int unscheduled_count_; 127 int unscheduled_count_;
128 128
129 // The number of times this scheduler has been artificially rescheduled on
130 // account of a timeout.
131 int rescheduled_count_;
132
133 SchedulingChangedCallback scheduling_changed_callback_; 129 SchedulingChangedCallback scheduling_changed_callback_;
134 base::Closure descheduled_callback_; 130 base::Closure descheduled_callback_;
135 base::Closure command_processed_callback_; 131 base::Closure command_processed_callback_;
136 132
137 // If non-NULL and |preemption_flag_->IsSet()|, exit PutChanged early. 133 // If non-NULL and |preemption_flag_->IsSet()|, exit PutChanged early.
138 scoped_refptr<PreemptionFlag> preemption_flag_; 134 scoped_refptr<PreemptionFlag> preemption_flag_;
139 bool was_preempted_; 135 bool was_preempted_;
140 136
141 // A factory for outstanding rescheduling tasks that is invalidated whenever
142 // the scheduler is rescheduled.
143 base::WeakPtrFactory<GpuScheduler> reschedule_task_factory_;
144
145 DISALLOW_COPY_AND_ASSIGN(GpuScheduler); 137 DISALLOW_COPY_AND_ASSIGN(GpuScheduler);
146 }; 138 };
147 139
148 } // namespace gpu 140 } // namespace gpu
149 141
150 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ 142 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698