diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/ui/gfx/swap_result.h | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/gfx/swap_result.h')
-rw-r--r-- | chromium/ui/gfx/swap_result.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/chromium/ui/gfx/swap_result.h b/chromium/ui/gfx/swap_result.h index 027a1914ae7..1a71e4ec174 100644 --- a/chromium/ui/gfx/swap_result.h +++ b/chromium/ui/gfx/swap_result.h @@ -5,10 +5,16 @@ #ifndef UI_GFX_SWAP_RESULT_H_ #define UI_GFX_SWAP_RESULT_H_ +#include <memory> + #include "base/time/time.h" +#include "ui/gfx/gfx_export.h" namespace gfx { +struct CALayerParams; +class GpuFence; + enum class SwapResult { SWAP_ACK, SWAP_FAILED, @@ -38,12 +44,32 @@ struct SwapResponse { uint64_t swap_id; // Indicates whether the swap succeeded or not. + // TODO(https://crbug.com/894929): It may be more reasonable to add + // a full SwapCompletionResult as a member. SwapResult result; // Timing information about the given swap. SwapTimings timings; }; +// Sent by GLImages to their GLImage::SwapCompletionCallbacks. +struct GFX_EXPORT SwapCompletionResult { + explicit SwapCompletionResult(gfx::SwapResult swap_result); + SwapCompletionResult(gfx::SwapResult swap_result, + std::unique_ptr<gfx::GpuFence> gpu_fence); + SwapCompletionResult(gfx::SwapResult swap_result, + std::unique_ptr<gfx::CALayerParams> ca_layer_params); + SwapCompletionResult(SwapCompletionResult&& other); + ~SwapCompletionResult(); + + SwapCompletionResult(const SwapCompletionResult& other) = delete; + SwapCompletionResult& operator=(const SwapCompletionResult other) = delete; + + gfx::SwapResult swap_result = SwapResult::SWAP_FAILED; + std::unique_ptr<GpuFence> gpu_fence; + std::unique_ptr<CALayerParams> ca_layer_params; +}; + } // namespace gfx #endif // UI_GFX_SWAP_RESULT_H_ |