| 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" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "cc/base/cc_export.h" | |
| 11 #include "cc/output/overlay_candidate.h" | |
| 12 #include "cc/output/overlay_processor.h" | 8 #include "cc/output/overlay_processor.h" |
| 13 #include "cc/output/overlay_strategy_common.h" | |
| 14 #include "cc/quads/render_pass.h" | |
| 15 | 9 |
| 16 namespace cc { | 10 namespace cc { |
| 17 class StreamVideoDrawQuad; | |
| 18 class TextureDrawQuad; | |
| 19 | 11 |
| 20 class CC_EXPORT OverlayStrategySingleOnTop | 12 class OverlayCandidateValidator; |
| 21 : public OverlayStrategyCommonDelegate { | 13 |
| 14 class CC_EXPORT OverlayStrategySingleOnTop : public OverlayProcessor::Strategy { |
| 22 public: | 15 public: |
| 23 OverlayStrategySingleOnTop() {} | 16 explicit OverlayStrategySingleOnTop( |
| 17 OverlayCandidateValidator* capability_checker); |
| 24 ~OverlayStrategySingleOnTop() override; | 18 ~OverlayStrategySingleOnTop() override; |
| 25 | 19 |
| 26 OverlayResult TryOverlay(OverlayCandidateValidator* capability_checker, | 20 bool Attempt(RenderPassList* render_passes, |
| 27 RenderPassList* render_passes_in_draw_order, | 21 OverlayCandidateList* candidate_list) override; |
| 28 OverlayCandidateList* candidate_list, | |
| 29 const OverlayCandidate& candidate, | |
| 30 QuadList::Iterator* candidate_iterator, | |
| 31 float device_scale_factor) override; | |
| 32 | 22 |
| 33 private: | 23 private: |
| 24 bool TryOverlay(QuadList& quad_list, |
| 25 OverlayCandidateList* candidate_list, |
| 26 const OverlayCandidate& candidate, |
| 27 QuadList::Iterator candidate_iterator); |
| 28 |
| 29 OverlayCandidateValidator* capability_checker_; // Weak. |
| 30 |
| 34 DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop); | 31 DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop); |
| 35 }; | 32 }; |
| 36 | 33 |
| 37 } // namespace cc | 34 } // namespace cc |
| 38 | 35 |
| 39 #endif // CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_ | 36 #endif // CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_ |
| OLD | NEW |