| 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 { |
| 20 class LatencyInfo; |
| 21 } |
| 22 |
| 19 namespace gpu { | 23 namespace gpu { |
| 20 | 24 |
| 21 struct SyncToken; | 25 struct SyncToken; |
| 22 | 26 |
| 23 class ContextSupport { | 27 class ContextSupport { |
| 24 public: | 28 public: |
| 25 // Runs |callback| when the given sync token is signalled. The sync token may | 29 // Runs |callback| when the given sync token is signalled. The sync token may |
| 26 // belong to any context. | 30 // belong to any context. |
| 27 virtual void SignalSyncToken(const SyncToken& sync_token, | 31 virtual void SignalSyncToken(const SyncToken& sync_token, |
| 28 const base::Closure& callback) = 0; | 32 const base::Closure& callback) = 0; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 56 const gfx::RectF& uv_rect) = 0; | 60 const gfx::RectF& uv_rect) = 0; |
| 57 | 61 |
| 58 // Returns an ID that can be used to globally identify the share group that | 62 // Returns an ID that can be used to globally identify the share group that |
| 59 // this context's resources belong to. | 63 // this context's resources belong to. |
| 60 virtual uint64_t ShareGroupTracingGUID() const = 0; | 64 virtual uint64_t ShareGroupTracingGUID() const = 0; |
| 61 | 65 |
| 62 // Sets a callback to be run when an error occurs. | 66 // Sets a callback to be run when an error occurs. |
| 63 virtual void SetErrorMessageCallback( | 67 virtual void SetErrorMessageCallback( |
| 64 const base::Callback<void(const char*, int32_t)>& callback) = 0; | 68 const base::Callback<void(const char*, int32_t)>& callback) = 0; |
| 65 | 69 |
| 70 // Add |latency_info| to be reported and augumented with GPU latency |
| 71 // components next time there is a GPU buffer swap. |
| 72 virtual void AddLatencyInfo( |
| 73 const std::vector<ui::LatencyInfo>& latency_info) = 0; |
| 74 |
| 66 protected: | 75 protected: |
| 67 ContextSupport() {} | 76 ContextSupport() {} |
| 68 virtual ~ContextSupport() {} | 77 virtual ~ContextSupport() {} |
| 69 }; | 78 }; |
| 70 | 79 |
| 71 } | 80 } |
| 72 | 81 |
| 73 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ | 82 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
| OLD | NEW |