| 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 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "ui/gfx/overlay_transform.h" | 11 #include "ui/gfx/overlay_transform.h" |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 class Rect; | 14 class Rect; |
| 15 class RectF; | 15 class RectF; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace gpu { | 18 namespace gpu { |
| 19 | 19 |
| 20 struct SyncToken; | 20 struct SyncToken; |
| 21 | 21 |
| 22 class ContextSupport { | 22 class ContextSupport { |
| 23 public: | 23 public: |
| 24 // Runs |callback| when a sync token is signalled. | 24 // Runs |callback| when a sync token is signalled. |
| 25 virtual void SignalSyncToken(const SyncToken& sync_token, | 25 virtual void SignalSyncToken(const SyncToken& sync_token, |
| 26 const base::Closure& callback) = 0; | 26 const base::Closure& callback) = 0; |
| 27 | 27 |
| 28 // Returns true if the given fence sync has been released (executed) by the |
| 29 // command buffer. This may be called from any thread. |
| 30 virtual bool IsFenceSyncReleased(uint64_t release_count) = 0; |
| 31 |
| 28 // Runs |callback| when a query created via glCreateQueryEXT() has cleared | 32 // Runs |callback| when a query created via glCreateQueryEXT() has cleared |
| 29 // passed the glEndQueryEXT() point. | 33 // passed the glEndQueryEXT() point. |
| 30 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; | 34 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; |
| 31 | 35 |
| 32 // Indicates whether the context should aggressively free allocated resources. | 36 // Indicates whether the context should aggressively free allocated resources. |
| 33 // If set to true, the context will purge all temporary resources when | 37 // If set to true, the context will purge all temporary resources when |
| 34 // flushed. | 38 // flushed. |
| 35 virtual void SetAggressivelyFreeResources( | 39 virtual void SetAggressivelyFreeResources( |
| 36 bool aggressively_free_resources) = 0; | 40 bool aggressively_free_resources) = 0; |
| 37 | 41 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 58 const base::Callback<void(const char*, int32_t)>& callback) = 0; | 62 const base::Callback<void(const char*, int32_t)>& callback) = 0; |
| 59 | 63 |
| 60 protected: | 64 protected: |
| 61 ContextSupport() {} | 65 ContextSupport() {} |
| 62 virtual ~ContextSupport() {} | 66 virtual ~ContextSupport() {} |
| 63 }; | 67 }; |
| 64 | 68 |
| 65 } | 69 } |
| 66 | 70 |
| 67 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ | 71 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
| OLD | NEW |