OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_H_ | 5 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_H_ |
6 #define CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_H_ | 6 #define CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "cc/output/overlay_processor.h" | 9 #include "cc/output/overlay_processor.h" |
10 | 10 |
11 namespace cc { | 11 namespace cc { |
12 | 12 |
13 class OverlayCandidateValidator; | 13 class OverlayCandidateValidator; |
14 | 14 |
15 // The underlay strategy looks for a video quad without regard to quads above | 15 // The underlay strategy looks for a video quad without regard to quads above |
16 // it. The video is "underlaid" through a black transparent quad substituted | 16 // it. The video is "underlaid" through a black transparent quad substituted |
17 // for the video quad. The overlay content can then be blended in by the | 17 // for the video quad. The overlay content can then be blended in by the |
18 // hardware under the the scene. This is only valid for overlay contents that | 18 // hardware under the the scene. This is only valid for overlay contents that |
19 // are fully opaque. | 19 // are fully opaque. |
20 class CC_EXPORT OverlayStrategyUnderlay : public OverlayProcessor::Strategy { | 20 class CC_EXPORT OverlayStrategyUnderlay : public OverlayProcessor::Strategy { |
21 public: | 21 public: |
22 explicit OverlayStrategyUnderlay( | 22 explicit OverlayStrategyUnderlay( |
23 OverlayCandidateValidator* capability_checker); | 23 OverlayCandidateValidator* capability_checker); |
24 ~OverlayStrategyUnderlay() override; | 24 ~OverlayStrategyUnderlay() override; |
25 | 25 |
26 bool Attempt(ResourceProvider* resource_provider, | 26 bool Attempt(ResourceProvider* resource_provider, |
27 RenderPass* render_pass, | 27 RenderPass* render_pass, |
28 OverlayCandidateList* candidate_list) override; | 28 OverlayCandidateList* candidate_list, |
| 29 std::vector<gfx::Rect>* content_bounds) override; |
29 | 30 |
30 private: | 31 private: |
31 OverlayCandidateValidator* capability_checker_; // Weak. | 32 OverlayCandidateValidator* capability_checker_; // Weak. |
32 | 33 |
33 DISALLOW_COPY_AND_ASSIGN(OverlayStrategyUnderlay); | 34 DISALLOW_COPY_AND_ASSIGN(OverlayStrategyUnderlay); |
34 }; | 35 }; |
35 | 36 |
36 } // namespace cc | 37 } // namespace cc |
37 | 38 |
38 #endif // CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_H_ | 39 #endif // CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_H_ |
OLD | NEW |