| Index: content/common/gpu/gpu_channel.h | 
| diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h | 
| index d51a98ba2761383b87df9247cfe2f7ffc2adb608..623bc380e8f542251df80c086c30a0fa1d5c8629 100644 | 
| --- a/content/common/gpu/gpu_channel.h | 
| +++ b/content/common/gpu/gpu_channel.h | 
| @@ -115,6 +115,10 @@ class CONTENT_EXPORT GpuChannel | 
| void OnAddSubscription(unsigned int target) override; | 
| void OnRemoveSubscription(unsigned int target) override; | 
|  | 
| +  // Add callback when a specific order number has been processed. | 
| +  void AddProcessedOrderNumberCallback(uint32_t order_number, | 
| +                                       const base::Closure& callback); | 
| + | 
| // This is called when a command buffer transitions from the unscheduled | 
| // state to the scheduled state, which potentially means the channel | 
| // transitions from the unscheduled to the scheduled state. When this occurs | 
| @@ -210,6 +214,21 @@ class CONTENT_EXPORT GpuChannel | 
| base::hash_set<int32> routes_; | 
| }; | 
|  | 
| +  struct OrderCallback { | 
| +    uint32_t order_number; | 
| +    base::Closure callback_closure; | 
| + | 
| +    OrderCallback(uint32_t order_num, const base::Closure& callback); | 
| +    ~OrderCallback(); | 
| + | 
| +    bool operator>(const OrderCallback& rhs) const { | 
| +      return order_number > rhs.order_number; | 
| +    } | 
| +  }; | 
| +  typedef std::priority_queue<OrderCallback, | 
| +                              std::vector<OrderCallback>, | 
| +                              std::greater<OrderCallback>> OrderCallbackQueue; | 
| + | 
| friend class GpuChannelMessageFilter; | 
| friend class GpuChannelMessageQueue; | 
|  | 
| @@ -291,6 +310,9 @@ class CONTENT_EXPORT GpuChannel | 
| // Map of stream id to stream state. | 
| base::hash_map<int32, StreamState> streams_; | 
|  | 
| +  // Callbacks as each order number is processed. | 
| +  OrderCallbackQueue processed_order_callbacks_; | 
| + | 
| bool allow_future_sync_points_; | 
| bool allow_real_time_streams_; | 
|  | 
|  |