| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_DELEGATE_H_ | 5 #ifndef GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_DELEGATE_H_ |
| 6 #define GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_DELEGATE_H_ | 6 #define GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "gpu/command_buffer/common/texture_in_use_response.h" | 9 #include "gpu/command_buffer/common/texture_in_use_response.h" |
| 10 #include "gpu/gpu_export.h" | 10 #include "gpu/gpu_export.h" |
| 11 #include "gpu/ipc/common/surface_handle.h" | 11 #include "gpu/ipc/common/surface_handle.h" |
| 12 #include "ui/events/latency_info.h" | 12 #include "ui/events/latency_info.h" |
| 13 #include "ui/gfx/swap_result.h" | 13 #include "ui/gfx/swap_result.h" |
| 14 | 14 |
| 15 #if defined(OS_MACOSX) | 15 #if defined(OS_MACOSX) |
| 16 #include "ui/base/cocoa/remote_layer_api.h" | 16 #include "ui/base/cocoa/remote_layer_api.h" |
| 17 #include "ui/gfx/mac/io_surface.h" | 17 #include "ui/gfx/mac/io_surface.h" |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 namespace IPC { |
| 21 class MessageFilter; |
| 22 } |
| 23 |
| 20 namespace gpu { | 24 namespace gpu { |
| 21 | 25 |
| 22 namespace gles2 { | 26 namespace gles2 { |
| 23 class FeatureInfo; | 27 class FeatureInfo; |
| 24 } | 28 } |
| 25 | 29 |
| 26 struct GPU_EXPORT SwapBuffersCompleteParams { | 30 struct GPU_EXPORT SwapBuffersCompleteParams { |
| 27 SwapBuffersCompleteParams(); | 31 SwapBuffersCompleteParams(); |
| 28 SwapBuffersCompleteParams(SwapBuffersCompleteParams&& other); | 32 SwapBuffersCompleteParams(SwapBuffersCompleteParams&& other); |
| 29 ~SwapBuffersCompleteParams(); | 33 ~SwapBuffersCompleteParams(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 70 |
| 67 using LatencyInfoCallback = | 71 using LatencyInfoCallback = |
| 68 base::Callback<void(const std::vector<ui::LatencyInfo>&)>; | 72 base::Callback<void(const std::vector<ui::LatencyInfo>&)>; |
| 69 // |callback| is called when the delegate has updated LatencyInfo available. | 73 // |callback| is called when the delegate has updated LatencyInfo available. |
| 70 virtual void SetLatencyInfoCallback(const LatencyInfoCallback& callback) = 0; | 74 virtual void SetLatencyInfoCallback(const LatencyInfoCallback& callback) = 0; |
| 71 | 75 |
| 72 // Informs the delegate about updated vsync parameters. | 76 // Informs the delegate about updated vsync parameters. |
| 73 virtual void UpdateVSyncParameters(base::TimeTicks timebase, | 77 virtual void UpdateVSyncParameters(base::TimeTicks timebase, |
| 74 base::TimeDelta interval) = 0; | 78 base::TimeDelta interval) = 0; |
| 75 | 79 |
| 80 // Add IPC message filter. |
| 81 virtual void AddFilter(IPC::MessageFilter* message_filter) = 0; |
| 82 // Gets route ID for sending / receiving IPC messages. |
| 83 virtual int32_t GetRouteID() const = 0; |
| 84 |
| 76 protected: | 85 protected: |
| 77 virtual ~ImageTransportSurfaceDelegate() {} | 86 virtual ~ImageTransportSurfaceDelegate() {} |
| 78 }; | 87 }; |
| 79 | 88 |
| 80 } // namespace gpu | 89 } // namespace gpu |
| 81 | 90 |
| 82 #endif // GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_DELEGATE_H_ | 91 #endif // GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_DELEGATE_H_ |
| OLD | NEW |