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

Unified Diff: cc/output/dc_layer_overlay.h

Issue 2736643004: Add DCLayerOverlayProcessor and supporting DCLayer structures. (Closed)
Patch Set: Created 3 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/dc_layer_overlay.h
diff --git a/cc/output/dc_layer_overlay.h b/cc/output/dc_layer_overlay.h
new file mode 100644
index 0000000000000000000000000000000000000000..fe489280ffb7fa0d20d2d3533131781d886fc7f4
--- /dev/null
+++ b/cc/output/dc_layer_overlay.h
@@ -0,0 +1,46 @@
+// Copyright 2017 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_DC_LAYER_OVERLAY_H_
+#define CC_OUTPUT_DC_LAYER_OVERLAY_H_
+
+#include "cc/output/ca_layer_overlay.h"
+
+namespace cc {
+
+class DCLayerOverlayProcessor {
+ public:
+ enum DCLayerResult {
+ DC_LAYER_SUCCESS,
+ DC_LAYER_FAILED_QUAD_BLEND_MODE,
+ DC_LAYER_FAILED_TEXTURE_NOT_CANDIDATE,
+ DC_LAYER_FAILED_OCCLUDED,
+ DC_LAYER_FAILED_UNKNOWN
+ };
+
+ void Process(ResourceProvider* resource_provider,
+ const gfx::RectF& display_rect,
+ QuadList* quad_list,
+ gfx::Rect* overlay_damage_rect,
+ gfx::Rect* damage_rect,
+ CALayerOverlayList* ca_layer_overlays);
+ void ClearOverlayState() {
+ previous_frame_underlay_rect_ = gfx::Rect();
+ previous_occlusion_bounding_box_ = gfx::Rect();
+ }
+
+ private:
+ DCLayerResult FromDrawQuad(ResourceProvider* resource_provider,
+ const gfx::RectF& display_rect,
+ QuadList::ConstIterator quad_list_begin,
+ QuadList::ConstIterator quad,
+ CALayerOverlay* ca_layer_overlay);
+
+ gfx::Rect previous_frame_underlay_rect_;
+ gfx::Rect previous_occlusion_bounding_box_;
+};
+
+} // namespace cc
+
+#endif // CC_OUTPUT_DC_LAYER_OVERLAY_H_
« no previous file with comments | « cc/BUILD.gn ('k') | cc/output/dc_layer_overlay.cc » ('j') | cc/output/overlay_processor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698