Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_COMMON_H_ |
| 6 #define CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_ | 6 #define CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 11 #include "cc/output/overlay_candidate.h" | 9 #include "cc/output/overlay_candidate.h" |
| 12 #include "cc/output/overlay_processor.h" | 10 #include "cc/output/overlay_processor.h" |
| 13 #include "cc/quads/render_pass.h" | |
| 14 | 11 |
| 15 namespace cc { | 12 namespace cc { |
| 16 class OverlayCandidateValidator; | 13 class OverlayCandidateValidator; |
| 17 class StreamVideoDrawQuad; | 14 class StreamVideoDrawQuad; |
| 18 class TextureDrawQuad; | 15 class TextureDrawQuad; |
| 16 class OverlayCandidate; | |
| 19 | 17 |
| 20 class CC_EXPORT OverlayStrategySingleOnTop : public OverlayProcessor::Strategy { | 18 class CC_EXPORT OverlayStrategyCommon : public OverlayProcessor::Strategy { |
| 21 public: | 19 public: |
| 22 OverlayStrategySingleOnTop(OverlayCandidateValidator* capability_checker, | 20 OverlayStrategyCommon(OverlayCandidateValidator* capability_checker, |
| 23 ResourceProvider* resource_provider); | 21 ResourceProvider* resource_provider); |
| 24 bool Attempt(RenderPassList* render_passes_in_draw_order, | 22 ~OverlayStrategyCommon() override; |
| 25 OverlayCandidateList* candidate_list) override; | |
| 26 | 23 |
| 27 private: | 24 protected: |
| 28 bool IsOverlayQuad(const DrawQuad* draw_quad); | |
| 29 bool GetCandidateQuadInfo(const DrawQuad& draw_quad, | 25 bool GetCandidateQuadInfo(const DrawQuad& draw_quad, |
| 30 OverlayCandidate* quad_info); | 26 OverlayCandidate* quad_info); |
| 31 | 27 |
| 32 // Returns true if |draw_quad| will not block quads underneath from becoming | 28 // Returns true if |draw_quad| will not block quads underneath from becoming |
| 33 // an overlay. | 29 // an overlay. |
| 34 bool IsInvisibleQuad(const DrawQuad* draw_quad); | 30 bool IsInvisibleQuad(const DrawQuad* draw_quad); |
| 35 | 31 |
| 32 // Returns true if |draw_qiad| is of a known quad type and contains an | |
|
danakj
2015/03/18 16:36:51
"draw_qiad"
achaulk
2015/03/18 16:51:34
Acknowledged.
| |
| 33 // overlayable resource. | |
| 34 bool IsOverlayQuad(const DrawQuad* draw_quad); | |
| 35 | |
| 36 bool GetTextureQuadInfo(const TextureDrawQuad& quad, | 36 bool GetTextureQuadInfo(const TextureDrawQuad& quad, |
| 37 OverlayCandidate* quad_info); | 37 OverlayCandidate* quad_info); |
| 38 bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad, | 38 bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad, |
| 39 OverlayCandidate* quad_info); | 39 OverlayCandidate* quad_info); |
| 40 | 40 |
| 41 OverlayCandidateValidator* capability_checker_; | 41 OverlayCandidateValidator* capability_checker_; |
| 42 ResourceProvider* resource_provider_; | 42 ResourceProvider* resource_provider_; |
| 43 DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop); | |
|
danakj
2015/03/18 16:36:51
keep this in the base class please
achaulk
2015/03/18 16:51:34
Done.
| |
| 44 }; | 43 }; |
| 45 | |
| 46 } // namespace cc | 44 } // namespace cc |
| 47 | 45 |
| 48 #endif // CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_ | 46 #endif // CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_ |
| OLD | NEW |