Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CLIENT_CONTEXT_SUPPORT_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "ui/gfx/overlay_transform.h" | 12 #include "ui/gfx/overlay_transform.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Rect; | 15 class Rect; |
| 16 class RectF; | 16 class RectF; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 class LatencyInfo; | 20 class LatencyInfo; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace gpu { | 23 namespace gpu { |
| 24 | 24 |
| 25 struct SyncToken; | 25 struct SyncToken; |
| 26 | 26 |
| 27 class ContextSupport { | 27 class ContextSupport { |
| 28 public: | 28 public: |
| 29 virtual void EnsureWorkVisibleAsync() = 0; | |
|
piman
2017/05/09 00:48:38
nit: please provide documentation. In particular,
sunnyps
2017/05/10 23:15:15
Sorry, I will split this out into a separate CL. I
| |
| 30 | |
| 29 // Runs |callback| when the given sync token is signalled. The sync token may | 31 // Runs |callback| when the given sync token is signalled. The sync token may |
| 30 // belong to any context. | 32 // belong to any context. |
| 31 virtual void SignalSyncToken(const SyncToken& sync_token, | 33 virtual void SignalSyncToken(const SyncToken& sync_token, |
| 32 const base::Closure& callback) = 0; | 34 const base::Closure& callback) = 0; |
| 33 | 35 |
| 34 // Returns true if the given sync token has been signaled. The sync token must | 36 // Returns true if the given sync token has been signaled. The sync token must |
| 35 // belong to this context. This may be called from any thread. | 37 // belong to this context. This may be called from any thread. |
| 36 virtual bool IsSyncTokenSignaled(const SyncToken& sync_token) = 0; | 38 virtual bool IsSyncTokenSignaled(const SyncToken& sync_token) = 0; |
| 37 | 39 |
| 38 // Runs |callback| when a query created via glCreateQueryEXT() has cleared | 40 // Runs |callback| when a query created via glCreateQueryEXT() has cleared |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 const std::vector<ui::LatencyInfo>& latency_info) = 0; | 75 const std::vector<ui::LatencyInfo>& latency_info) = 0; |
| 74 | 76 |
| 75 protected: | 77 protected: |
| 76 ContextSupport() {} | 78 ContextSupport() {} |
| 77 virtual ~ContextSupport() {} | 79 virtual ~ContextSupport() {} |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } | 82 } |
| 81 | 83 |
| 82 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ | 84 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
| OLD | NEW |