| OLD | NEW |
| 1 // Copyright 2015 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_COMMON_H_ | 5 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_ |
| 6 #define CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_ | 6 #define CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_ |
| 7 | 7 |
| 8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/output/overlay_candidate.h" | 9 #include "cc/output/overlay_candidate.h" |
| 10 #include "cc/output/overlay_processor.h" | 10 #include "cc/output/overlay_processor.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 ~OverlayStrategyCommon() override; | 46 ~OverlayStrategyCommon() override; |
| 47 | 47 |
| 48 bool Attempt(RenderPassList* render_passes_in_draw_order, | 48 bool Attempt(RenderPassList* render_passes_in_draw_order, |
| 49 OverlayCandidateList* candidate_list, | 49 OverlayCandidateList* candidate_list, |
| 50 float device_scale_factor) override; | 50 float device_scale_factor) override; |
| 51 | 51 |
| 52 // Returns true if |draw_quad| will not block quads underneath from becoming | 52 // Returns true if |draw_quad| will not block quads underneath from becoming |
| 53 // an overlay. | 53 // an overlay. |
| 54 static bool IsInvisibleQuad(const DrawQuad* draw_quad); | 54 static bool IsInvisibleQuad(const DrawQuad* draw_quad); |
| 55 | 55 |
| 56 protected: | |
| 57 // Returns true if |draw_quad| is of a known quad type and contains an | |
| 58 // overlayable resource. | |
| 59 bool GetCandidateQuadInfo(const DrawQuad& draw_quad, | |
| 60 OverlayCandidate* quad_info); | |
| 61 bool GetTextureQuadInfo(const TextureDrawQuad& quad, | |
| 62 OverlayCandidate* quad_info); | |
| 63 bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad, | |
| 64 OverlayCandidate* quad_info); | |
| 65 bool GetIOSurfaceQuadInfo(const IOSurfaceDrawQuad& quad, | |
| 66 OverlayCandidate* quad_info); | |
| 67 | |
| 68 private: | 56 private: |
| 69 OverlayCandidateValidator* capability_checker_; | 57 OverlayCandidateValidator* capability_checker_; |
| 70 scoped_ptr<OverlayStrategyCommonDelegate> delegate_; | 58 scoped_ptr<OverlayStrategyCommonDelegate> delegate_; |
| 71 | 59 |
| 72 DISALLOW_COPY_AND_ASSIGN(OverlayStrategyCommon); | 60 DISALLOW_COPY_AND_ASSIGN(OverlayStrategyCommon); |
| 73 }; | 61 }; |
| 74 } // namespace cc | 62 } // namespace cc |
| 75 | 63 |
| 76 #endif // CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_ | 64 #endif // CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_ |
| OLD | NEW |