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 | 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 class ScopedContextClientVisibility; | |
|
danakj
2016/08/18 21:39:44
remove?
ericrk
2016/08/19 17:23:19
Done.
| |
| 20 struct SyncToken; | 21 struct SyncToken; |
| 21 | 22 |
| 22 class ContextSupport { | 23 class ContextSupport { |
| 23 public: | 24 public: |
| 24 // Runs |callback| when a sync token is signalled. | 25 // Runs |callback| when a sync token is signalled. |
| 25 virtual void SignalSyncToken(const SyncToken& sync_token, | 26 virtual void SignalSyncToken(const SyncToken& sync_token, |
| 26 const base::Closure& callback) = 0; | 27 const base::Closure& callback) = 0; |
| 27 | 28 |
| 28 // Runs |callback| when a query created via glCreateQueryEXT() has cleared | 29 // Runs |callback| when a query created via glCreateQueryEXT() has cleared |
| 29 // passed the glEndQueryEXT() point. | 30 // passed the glEndQueryEXT() point. |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 49 const gfx::RectF& uv_rect) = 0; | 50 const gfx::RectF& uv_rect) = 0; |
| 50 | 51 |
| 51 // Returns an ID that can be used to globally identify the share group that | 52 // Returns an ID that can be used to globally identify the share group that |
| 52 // this context's resources belong to. | 53 // this context's resources belong to. |
| 53 virtual uint64_t ShareGroupTracingGUID() const = 0; | 54 virtual uint64_t ShareGroupTracingGUID() const = 0; |
| 54 | 55 |
| 55 // Sets a callback to be run when an error occurs. | 56 // Sets a callback to be run when an error occurs. |
| 56 virtual void SetErrorMessageCallback( | 57 virtual void SetErrorMessageCallback( |
| 57 const base::Callback<void(const char*, int32_t)>& callback) = 0; | 58 const base::Callback<void(const char*, int32_t)>& callback) = 0; |
| 58 | 59 |
| 59 // Called when a client of the context has changed visibility. | 60 class ScopedVisibility {}; |
| 60 virtual void SetClientVisible(int client_id, bool is_visible) = 0; | 61 virtual std::unique_ptr<ScopedVisibility> ClientBecameVisible() = 0; |
| 62 virtual void ClientBecameNotVisible( | |
| 63 std::unique_ptr<ScopedVisibility> visibility) = 0; | |
| 61 virtual bool AnyClientsVisible() const = 0; | 64 virtual bool AnyClientsVisible() const = 0; |
| 62 | 65 |
| 63 protected: | 66 protected: |
| 64 ContextSupport() {} | 67 ContextSupport() {} |
| 65 virtual ~ContextSupport() {} | 68 virtual ~ContextSupport() {} |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 } | 71 } |
| 69 | 72 |
| 70 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ | 73 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
| OLD | NEW |