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

Unified Diff: cc/output/overlay_strategy_underlay.h

Issue 979693005: Add underlays and split off common overlay functionality (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test + check quad switching 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
Index: cc/output/overlay_strategy_underlay.h
diff --git a/cc/output/overlay_strategy_underlay.h b/cc/output/overlay_strategy_underlay.h
new file mode 100644
index 0000000000000000000000000000000000000000..8bc0860029499e7bef4aafc5ef4a37801fcd998a
--- /dev/null
+++ b/cc/output/overlay_strategy_underlay.h
@@ -0,0 +1,36 @@
+// Copyright 2014 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_UNDERLAY_H_
+#define CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_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/output/overlay_strategy_common.h"
+#include "cc/quads/render_pass.h"
+
+namespace cc {
+class StreamVideoDrawQuad;
+class TextureDrawQuad;
+
+// The underlay strategy looks for a video quad without regard to quads above
+// it. The video is "underlaid" through the same mechanism as the video hole -
danakj 2015/03/18 16:36:51 The video hole mechanism was explicitly kept behin
achaulk 2015/03/18 16:51:34 The plan AFAIK is to do as much of what the VIDEO_
alexst (slow to review) 2015/03/18 17:47:29 I would prefer we strip out video hole references
achaulk 2015/03/18 19:40:39 Sure, I can remove the video hole mention
+// a black transparent quad blended normally.
+class CC_EXPORT OverlayStrategyUnderlay : public OverlayStrategyCommon {
+ public:
+ OverlayStrategyUnderlay(OverlayCandidateValidator* capability_checker,
+ ResourceProvider* resource_provider);
+ bool Attempt(RenderPassList* render_passes_in_draw_order,
+ OverlayCandidateList* candidate_list) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OverlayStrategyUnderlay);
+};
+
+} // namespace cc
+
+#endif // CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_H_

Powered by Google App Engine
This is Rietveld 408576698