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