Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: cc/output/overlay_strategy_common.h

Issue 1373373003: Mac Overlays: Add AllOrNothing strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@OverlayTest
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698