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_SINGLE_ON_TOP_H_ | 5 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_ |
6 #define CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_ | 6 #define CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
11 #include "cc/output/overlay_candidate.h" | 11 #include "cc/output/overlay_candidate.h" |
12 #include "cc/output/overlay_processor.h" | 12 #include "cc/output/overlay_processor.h" |
13 #include "cc/quads/render_pass.h" | 13 #include "cc/quads/render_pass.h" |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 class OverlayCandidateValidator; | 16 class OverlayCandidateValidator; |
| 17 class StreamVideoDrawQuad; |
| 18 class TextureDrawQuad; |
17 | 19 |
18 class CC_EXPORT OverlayStrategySingleOnTop : public OverlayProcessor::Strategy { | 20 class CC_EXPORT OverlayStrategySingleOnTop : public OverlayProcessor::Strategy { |
19 public: | 21 public: |
20 OverlayStrategySingleOnTop(OverlayCandidateValidator* capability_checker, | 22 OverlayStrategySingleOnTop(OverlayCandidateValidator* capability_checker, |
21 ResourceProvider* resource_provider); | 23 ResourceProvider* resource_provider); |
22 bool Attempt(RenderPassList* render_passes_in_draw_order, | 24 bool Attempt(RenderPassList* render_passes_in_draw_order, |
23 OverlayCandidateList* candidate_list) override; | 25 OverlayCandidateList* candidate_list) override; |
24 | 26 |
25 private: | 27 private: |
| 28 bool IsOverlayQuad(const DrawQuad* draw_quad); |
| 29 bool GetCandidateQuadInfo(const DrawQuad& draw_quad, |
| 30 OverlayCandidate* quad_info); |
| 31 |
| 32 bool GetTextureQuadInfo(const TextureDrawQuad& quad, |
| 33 OverlayCandidate* quad_info); |
| 34 bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad, |
| 35 OverlayCandidate* quad_info); |
| 36 |
26 OverlayCandidateValidator* capability_checker_; | 37 OverlayCandidateValidator* capability_checker_; |
27 ResourceProvider* resource_provider_; | 38 ResourceProvider* resource_provider_; |
28 DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop); | 39 DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop); |
29 }; | 40 }; |
30 | 41 |
31 } // namespace cc | 42 } // namespace cc |
32 | 43 |
33 #endif // CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_ | 44 #endif // CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_ |
OLD | NEW |