| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef GPU_IPC_SERVICE_GPU_COMMAND_STREAM_H_ |
| 6 #define GPU_IPC_SERVICE_GPU_COMMAND_STREAM_H_ |
| 7 |
| 8 #include "gpu/gpu_export.h" |
| 9 #include "gpu/ipc/common/gpu_stream_constants.h" |
| 10 |
| 11 namespace gpu { |
| 12 |
| 13 // GpuCommandStream is a stream of commands from a client. Streams are |
| 14 // independent of each other and must synchronize / share resources explicitly. |
| 15 // GpuScheduler cooperatively schedules streams from multiple clients. |
| 16 class GPU_EXPORT GpuCommandStream { |
| 17 public: |
| 18 // Run commands in this stream. The stream should check |
| 19 // GpuScheduler::ShouldYield periodically and yield accordingly. Called on |
| 20 // main thread. |
| 21 virtual void Run() = 0; |
| 22 |
| 23 protected: |
| 24 virtual ~GpuCommandStream() {} |
| 25 }; |
| 26 |
| 27 } |
| 28 |
| 29 #endif // GPU_IPC_SERVICE_GPU_COMMAND_STREAM_H_ |
| OLD | NEW |