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

Side by Side Diff: cc/output/ca_layer_overlay.h

Issue 2164613003: Add logic to convert from RenderPassDrawQuads to CALayerOverlays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp41_rpdq_converter
Patch Set: Compile errors. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/output/ca_layer_overlay.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_OUTPUT_CA_LAYER_OVERLAY_H_ 5 #ifndef CC_OUTPUT_CA_LAYER_OVERLAY_H_
6 #define CC_OUTPUT_CA_LAYER_OVERLAY_H_ 6 #define CC_OUTPUT_CA_LAYER_OVERLAY_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "cc/quads/render_pass.h" 9 #include "cc/quads/render_pass.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
11 #include "third_party/skia/include/core/SkMatrix44.h" 11 #include "third_party/skia/include/core/SkMatrix44.h"
12 #include "ui/gfx/geometry/rect_f.h" 12 #include "ui/gfx/geometry/rect_f.h"
13 #include "ui/gl/ca_renderer_layer_params.h"
13 14
14 namespace cc { 15 namespace cc {
15 16
16 class DrawQuad; 17 class DrawQuad;
17 class ResourceProvider; 18 class ResourceProvider;
18 19
19 // Holds information that is frequently shared between consecutive 20 // Holds information that is frequently shared between consecutive
20 // CALayerOverlays. 21 // CALayerOverlays.
21 class CC_EXPORT CALayerOverlaySharedState 22 class CC_EXPORT CALayerOverlaySharedState
22 : public base::RefCounted<CALayerOverlaySharedState> { 23 : public base::RefCounted<CALayerOverlaySharedState> {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // The contents rect property for the CALayer. 56 // The contents rect property for the CALayer.
56 gfx::RectF contents_rect; 57 gfx::RectF contents_rect;
57 // The bounds for the CALayer in pixels. 58 // The bounds for the CALayer in pixels.
58 gfx::RectF bounds_rect; 59 gfx::RectF bounds_rect;
59 // The background color property for the CALayer. 60 // The background color property for the CALayer.
60 SkColor background_color = SK_ColorTRANSPARENT; 61 SkColor background_color = SK_ColorTRANSPARENT;
61 // The edge anti-aliasing mask property for the CALayer. 62 // The edge anti-aliasing mask property for the CALayer.
62 unsigned edge_aa_mask = 0; 63 unsigned edge_aa_mask = 0;
63 // The minification and magnification filters for the CALayer. 64 // The minification and magnification filters for the CALayer.
64 unsigned filter; 65 unsigned filter;
66
67 // If valid, the renderer must copy the contents of the render pass into an
68 // overlay resource to use as the contents.
69 RenderPassId render_pass_id;
70 ui::CARendererLayerParams::FilterEffects filter_effects;
65 }; 71 };
66 72
67 typedef std::vector<CALayerOverlay> CALayerOverlayList; 73 typedef std::vector<CALayerOverlay> CALayerOverlayList;
68 74
69 // Returns true if all quads in the root render pass have been replaced by 75 // Returns true if all quads in the root render pass have been replaced by
70 // CALayerOverlays. 76 // CALayerOverlays.
71 bool ProcessForCALayerOverlays(ResourceProvider* resource_provider, 77 bool ProcessForCALayerOverlays(ResourceProvider* resource_provider,
72 const gfx::RectF& display_rect, 78 const gfx::RectF& display_rect,
73 const QuadList& quad_list, 79 const QuadList& quad_list,
74 CALayerOverlayList* ca_layer_overlays); 80 CALayerOverlayList* ca_layer_overlays);
75 81
82 // Allows RenderPassDrawQuads to be converted to CALayerOverlays.
83 void CC_EXPORT EnableRenderPassDrawQuadForTesting();
84
76 } // namespace cc 85 } // namespace cc
77 86
78 #endif // CC_OUTPUT_CA_LAYER_OVERLAY_H_ 87 #endif // CC_OUTPUT_CA_LAYER_OVERLAY_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/ca_layer_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698