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

Unified Diff: cc/output/overlay_strategy_common.h

Issue 979693005: Add underlays and split off common overlay functionality (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: overlay test changes Created 5 years, 9 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 | « cc/cc.gyp ('k') | 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_single_on_top.h b/cc/output/overlay_strategy_common.h
similarity index 57%
copy from cc/output/overlay_strategy_single_on_top.h
copy to cc/output/overlay_strategy_common.h
index a3fec0a66e38a4d9019ab193c7eb445bcee7170f..515a106e78201199660a22f3ac40fd04dc80027c 100644
--- a/cc/output/overlay_strategy_single_on_top.h
+++ b/cc/output/overlay_strategy_common.h
@@ -1,31 +1,27 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
-#define CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
+#ifndef CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_
+#define CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
#include "cc/base/cc_export.h"
#include "cc/output/overlay_candidate.h"
#include "cc/output/overlay_processor.h"
-#include "cc/quads/render_pass.h"
namespace cc {
class OverlayCandidateValidator;
class StreamVideoDrawQuad;
class TextureDrawQuad;
+class OverlayCandidate;
-class CC_EXPORT OverlayStrategySingleOnTop : public OverlayProcessor::Strategy {
+class CC_EXPORT OverlayStrategyCommon : public OverlayProcessor::Strategy {
public:
- OverlayStrategySingleOnTop(OverlayCandidateValidator* capability_checker,
- ResourceProvider* resource_provider);
- bool Attempt(RenderPassList* render_passes_in_draw_order,
- OverlayCandidateList* candidate_list) override;
+ OverlayStrategyCommon(OverlayCandidateValidator* capability_checker,
+ ResourceProvider* resource_provider);
+ ~OverlayStrategyCommon() override;
- private:
- bool IsOverlayQuad(const DrawQuad* draw_quad);
+ protected:
bool GetCandidateQuadInfo(const DrawQuad& draw_quad,
OverlayCandidate* quad_info);
@@ -33,6 +29,10 @@ class CC_EXPORT OverlayStrategySingleOnTop : public OverlayProcessor::Strategy {
// an overlay.
bool IsInvisibleQuad(const DrawQuad* draw_quad);
+ // Returns true if |draw_quad| is of a known quad type and contains an
+ // overlayable resource.
+ bool IsOverlayQuad(const DrawQuad* draw_quad);
+
bool GetTextureQuadInfo(const TextureDrawQuad& quad,
OverlayCandidate* quad_info);
bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad,
@@ -40,9 +40,10 @@ class CC_EXPORT OverlayStrategySingleOnTop : public OverlayProcessor::Strategy {
OverlayCandidateValidator* capability_checker_;
ResourceProvider* resource_provider_;
- DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop);
-};
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OverlayStrategyCommon);
+};
} // namespace cc
-#endif // CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
+#endif // CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_
« no previous file with comments | « cc/cc.gyp ('k') | cc/output/overlay_strategy_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698