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

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: Created 5 years, 10 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
Index: cc/output/overlay_strategy_common.h
diff --git a/cc/output/overlay_strategy_common.h b/cc/output/overlay_strategy_common.h
new file mode 100644
index 0000000000000000000000000000000000000000..cf6c467ad907fd5e5c37560e0a5ca3e386766dea
--- /dev/null
+++ b/cc/output/overlay_strategy_common.h
@@ -0,0 +1,39 @@
+// 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_COMMON_H_
+#define CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_
+
+#include "cc/base/cc_export.h"
+#include "cc/output/overlay_candidate.h"
+#include "cc/output/overlay_processor.h"
+
+namespace cc {
+class StreamVideoDrawQuad;
+class TextureDrawQuad;
+class OverlayCandidate;
+
+class CC_EXPORT OverlayStrategyCommon : public OverlayProcessor::Strategy {
+ public:
+ OverlayStrategyCommon(ResourceProvider* resource_provider);
+ virtual ~OverlayStrategyCommon();
+
+ protected:
+ bool GetCandidateQuadInfo(const DrawQuad& draw_quad,
+ OverlayCandidate* quad_info);
+
+ // Returns true if |draw_quad| will not block quads underneath from becoming
+ // an overlay.
+ bool IsInvisibleQuad(const DrawQuad* draw_quad);
+
+ bool GetTextureQuadInfo(const TextureDrawQuad& quad,
+ OverlayCandidate* quad_info);
+ bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad,
+ OverlayCandidate* quad_info);
+
+ ResourceProvider* resource_provider_;
+};
+}
+
+#endif // CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_

Powered by Google App Engine
This is Rietveld 408576698