Index: cc/output/overlay_strategy_cast_underlay.h |
diff --git a/cc/output/overlay_strategy_cast_underlay.h b/cc/output/overlay_strategy_cast_underlay.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e8d4b385ad1a839899cf7bc02fb3f99aa5ba8ec9 |
--- /dev/null |
+++ b/cc/output/overlay_strategy_cast_underlay.h |
@@ -0,0 +1,37 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CC_OUTPUT_OVERLAY_STRATEGY_CAST_UNDERLAY_H_ |
+#define CC_OUTPUT_OVERLAY_STRATEGY_CAST_UNDERLAY_H_ |
+ |
+#include "base/macros.h" |
+#include "cc/output/overlay_strategy_underlay.h" |
+ |
+namespace cc { |
+ |
+class OverlayCandidateValidator; |
+ |
+// Similar to underlay strategy but with cast-specific damage rect calculation. |
+class CC_EXPORT OverlayStrategyCastUnderlay : public OverlayStrategyUnderlay { |
+ public: |
+ explicit OverlayStrategyCastUnderlay( |
+ OverlayCandidateValidator* capability_checker); |
+ ~OverlayStrategyCastUnderlay() override; |
+ |
+ bool Attempt(ResourceProvider* resource_provider, |
+ RenderPass* render_pass, |
+ OverlayCandidateList* candidate_list) override; |
+ |
+ bool GetSwapWithDamageRect(gfx::Rect* rect) override; |
+ |
+ private: |
+ bool have_swap_with_damage_rect_; |
+ gfx::Rect swap_with_damage_rect_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(OverlayStrategyCastUnderlay); |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_OUTPUT_OVERLAY_STRATEGY_CAST_UNDERLAY_H_ |