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

Unified Diff: cc/output/overlay_strategy_common.h

Issue 1330953002: Mac Overlays: Allow multiple overlays with sandwich strategy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2490
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/output/overlay_strategy_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_strategy_common.h
diff --git a/cc/output/overlay_strategy_common.h b/cc/output/overlay_strategy_common.h
index 6d8c40559eb6afed356c8430ec9d0c73040fb75b..eb8b13c30e76ec1b22dffd266fbd56f8df3cc42b 100644
--- a/cc/output/overlay_strategy_common.h
+++ b/cc/output/overlay_strategy_common.h
@@ -16,15 +16,27 @@ class OverlayCandidateValidator;
class StreamVideoDrawQuad;
class TextureDrawQuad;
+enum OverlayResult {
+ DID_NOT_CREATE_OVERLAY,
+ CREATED_OVERLAY_STOP_LOOKING,
+ CREATED_OVERLAY_KEEP_LOOKING,
+};
+
class CC_EXPORT OverlayStrategyCommonDelegate {
public:
virtual ~OverlayStrategyCommonDelegate() {}
- virtual bool TryOverlay(OverlayCandidateValidator* capability_checker,
- RenderPassList* render_passes_in_draw_order,
- OverlayCandidateList* candidate_list,
- const OverlayCandidate& candidate,
- QuadList::Iterator iter,
- float device_scale_factor) = 0;
+
+ // Check if |candidate| can be promoted into an overlay. If so, add it to
+ // |candidate_list| and update the quads in |render_passes_in_draw_order|
+ // as necessary. When returning CREATED_OVERLAY_KEEP_LOOKING, |iter| is
+ // updated to point to the next quad to evaluate.
+ virtual OverlayResult TryOverlay(
+ OverlayCandidateValidator* capability_checker,
+ RenderPassList* render_passes_in_draw_order,
+ OverlayCandidateList* candidate_list,
+ const OverlayCandidate& candidate,
+ QuadList::Iterator* iter,
+ float device_scale_factor) = 0;
};
class CC_EXPORT OverlayStrategyCommon : public OverlayProcessor::Strategy {
@@ -42,13 +54,10 @@ class CC_EXPORT OverlayStrategyCommon : public OverlayProcessor::Strategy {
static bool IsInvisibleQuad(const DrawQuad* draw_quad);
protected:
- bool GetCandidateQuadInfo(const DrawQuad& draw_quad,
- OverlayCandidate* quad_info);
-
// Returns true if |draw_quad| is of a known quad type and contains an
// overlayable resource.
- bool IsOverlayQuad(const DrawQuad* draw_quad);
-
+ bool GetCandidateQuadInfo(const DrawQuad& draw_quad,
+ OverlayCandidate* quad_info);
bool GetTextureQuadInfo(const TextureDrawQuad& quad,
OverlayCandidate* quad_info);
bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad,
« no previous file with comments | « no previous file | cc/output/overlay_strategy_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698