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

Unified Diff: cc/output/overlay_strategy_single_on_top.h

Issue 1531403002: Revert "Delete CC." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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/output/overlay_processor.cc ('k') | cc/output/overlay_strategy_single_on_top.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_strategy_single_on_top.h
diff --git a/cc/output/overlay_strategy_single_on_top.h b/cc/output/overlay_strategy_single_on_top.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b261af6bc96881466b6a9e2aa01bc378a57afe3
--- /dev/null
+++ b/cc/output/overlay_strategy_single_on_top.h
@@ -0,0 +1,47 @@
+// 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_SINGLE_ON_TOP_H_
+#define CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.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 OverlayStrategySingleOnTop : public OverlayProcessor::Strategy {
+ public:
+ OverlayStrategySingleOnTop(OverlayCandidateValidator* capability_checker,
+ ResourceProvider* resource_provider);
+ bool Attempt(RenderPassList* render_passes_in_draw_order,
+ OverlayCandidateList* candidate_list) override;
+
+ private:
+ bool IsOverlayQuad(const DrawQuad* draw_quad);
+ 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);
+
+ OverlayCandidateValidator* capability_checker_;
+ ResourceProvider* resource_provider_;
+ DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop);
+};
+
+} // namespace cc
+
+#endif // CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
« no previous file with comments | « cc/output/overlay_processor.cc ('k') | cc/output/overlay_strategy_single_on_top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698