| 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" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 const gfx::RectF& uv_rect) = 0; | 49 const gfx::RectF& uv_rect) = 0; |
| 50 | 50 |
| 51 // Returns an ID that can be used to globally identify the share group that | 51 // Returns an ID that can be used to globally identify the share group that |
| 52 // this context's resources belong to. | 52 // this context's resources belong to. |
| 53 virtual uint64_t ShareGroupTracingGUID() const = 0; | 53 virtual uint64_t ShareGroupTracingGUID() const = 0; |
| 54 | 54 |
| 55 // Sets a callback to be run when an error occurs. | 55 // Sets a callback to be run when an error occurs. |
| 56 virtual void SetErrorMessageCallback( | 56 virtual void SetErrorMessageCallback( |
| 57 const base::Callback<void(const char*, int32_t)>& callback) = 0; | 57 const base::Callback<void(const char*, int32_t)>& callback) = 0; |
| 58 | 58 |
| 59 // Called when a client of the context has changed visibility. | 59 class ScopedVisibility {}; |
| 60 virtual void SetClientVisible(int client_id, bool is_visible) = 0; | 60 virtual std::unique_ptr<ScopedVisibility> ClientBecameVisible() = 0; |
| 61 virtual void ClientBecameNotVisible( |
| 62 std::unique_ptr<ScopedVisibility> visibility) = 0; |
| 61 virtual bool AnyClientsVisible() const = 0; | 63 virtual bool AnyClientsVisible() const = 0; |
| 62 | 64 |
| 63 protected: | 65 protected: |
| 64 ContextSupport() {} | 66 ContextSupport() {} |
| 65 virtual ~ContextSupport() {} | 67 virtual ~ContextSupport() {} |
| 66 }; | 68 }; |
| 67 | 69 |
| 68 } | 70 } |
| 69 | 71 |
| 70 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ | 72 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
| OLD | NEW |