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

Unified Diff: cc/output/overlay_processor.cc

Issue 197223003: Start of hardware overlay support in CC with Ubercompositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/output/overlay_processor.h ('k') | cc/output/overlay_strategy_single_on_top.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_processor.cc
diff --git a/cc/output/overlay_processor.cc b/cc/output/overlay_processor.cc
new file mode 100644
index 0000000000000000000000000000000000000000..afdb966fe0133db8a778bee1a842b7813bde6d41
--- /dev/null
+++ b/cc/output/overlay_processor.cc
@@ -0,0 +1,42 @@
+// 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.
+
+#include "cc/output/overlay_processor.h"
+
+#include "cc/output/output_surface.h"
+#include "cc/output/overlay_strategy_single_on_top.h"
+#include "cc/quads/draw_quad.h"
+#include "cc/quads/texture_draw_quad.h"
+#include "ui/gfx/rect_conversions.h"
+#include "ui/gfx/transform.h"
+
+namespace cc {
+
+OverlayProcessor::OverlayProcessor(OutputSurface* surface,
+ ResourceProvider* resource_provider)
+ : surface_(surface), resource_provider_(resource_provider) {}
+
+void OverlayProcessor::Initialize() {
+ DCHECK(surface_);
+ DCHECK(resource_provider_);
+ OverlayCandidateValidator* candidates =
+ surface_->overlay_candidate_validator();
+ if (candidates) {
+ strategies_.push_back(scoped_ptr<Strategy>(
+ new OverlayStrategySingleOnTop(candidates, resource_provider_)));
+ }
+}
+
+OverlayProcessor::~OverlayProcessor() {}
+
+void OverlayProcessor::ProcessForOverlays(
+ RenderPassList* render_passes_in_draw_order) {
+ for (StrategyList::iterator it = strategies_.begin(); it != strategies_.end();
+ ++it) {
+ if ((*it)->Attempt(render_passes_in_draw_order))
+ return;
+ }
+}
+
+} // namespace cc
« no previous file with comments | « cc/output/overlay_processor.h ('k') | cc/output/overlay_strategy_single_on_top.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698