| Index: content/common/gpu/gpu_channel.cc
|
| diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
|
| index c16db443bebd86e23724f6d10408f224840c5524..99b1038fb50a382fe1a70881c08a0a9fd690a6cf 100644
|
| --- a/content/common/gpu/gpu_channel.cc
|
| +++ b/content/common/gpu/gpu_channel.cc
|
| @@ -593,6 +593,12 @@ bool GpuChannel::StreamState::HasRoutes() const {
|
| return !routes_.empty();
|
| }
|
|
|
| +GpuChannel::OrderCallback::OrderCallback(uint32_t order_num,
|
| + const base::Closure& callback)
|
| + : order_number(order_num), callback_closure(callback) {}
|
| +
|
| +GpuChannel::OrderCallback::~OrderCallback() {}
|
| +
|
| GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager,
|
| GpuWatchdog* watchdog,
|
| gfx::GLShareGroup* share_group,
|
| @@ -712,6 +718,12 @@ void GpuChannel::OnRemoveSubscription(unsigned int target) {
|
| new GpuHostMsg_RemoveSubscription(client_id_, target));
|
| }
|
|
|
| +void GpuChannel::AddProcessedOrderNumberCallback(
|
| + uint32_t order_number,
|
| + const base::Closure& callback) {
|
| + processed_order_callbacks_.push(OrderCallback(order_number, callback));
|
| +}
|
| +
|
| void GpuChannel::StubSchedulingChanged(bool scheduled) {
|
| bool a_stub_was_descheduled = num_stubs_descheduled_ > 0;
|
| if (scheduled) {
|
| @@ -1083,6 +1095,12 @@ void GpuChannel::MessageProcessed(uint32_t order_number) {
|
| DCHECK(current_order_num_ == order_number);
|
| DCHECK(processed_order_num_ < order_number);
|
| processed_order_num_ = order_number;
|
| +
|
| + while (!processed_order_callbacks_.empty() &&
|
| + processed_order_callbacks_.top().order_number <= order_number) {
|
| + processed_order_callbacks_.top().callback_closure.Run();
|
| + processed_order_callbacks_.pop();
|
| + }
|
| }
|
| if (preempting_flag_.get()) {
|
| io_task_runner_->PostTask(
|
|
|