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

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

Issue 2205133003: Implement new RPDQ copy logic for CALayer promotion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp60_more_refactor
Patch Set: Comments from ccameron. Created 4 years, 4 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 #include "ui/gl/ca_renderer_layer_params.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 class DrawQuad; 17 class DrawQuad;
18 class RenderPassDrawQuad;
18 class ResourceProvider; 19 class ResourceProvider;
19 20
20 // Holds information that is frequently shared between consecutive 21 // Holds information that is frequently shared between consecutive
21 // CALayerOverlays. 22 // CALayerOverlays.
22 class CC_EXPORT CALayerOverlaySharedState 23 class CC_EXPORT CALayerOverlaySharedState
23 : public base::RefCounted<CALayerOverlaySharedState> { 24 : public base::RefCounted<CALayerOverlaySharedState> {
24 public: 25 public:
25 CALayerOverlaySharedState() {} 26 CALayerOverlaySharedState() {}
26
27 // Layers in a non-zero sorting context exist in the same 3D space and should 27 // Layers in a non-zero sorting context exist in the same 3D space and should
28 // intersect. 28 // intersect.
29 unsigned sorting_context_id = 0; 29 unsigned sorting_context_id = 0;
30 // If |is_clipped| is true, then clip to |clip_rect| in the target space. 30 // If |is_clipped| is true, then clip to |clip_rect| in the target space.
31 bool is_clipped = false; 31 bool is_clipped = false;
32 gfx::RectF clip_rect; 32 gfx::RectF clip_rect;
33 // The opacity property for the CAayer. 33 // The opacity property for the CAayer.
34 float opacity = 1; 34 float opacity = 1;
35 // The transform to apply to the CALayer. 35 // The transform to apply to the CALayer.
36 SkMatrix44 transform = SkMatrix44(SkMatrix44::kIdentity_Constructor); 36 SkMatrix44 transform = SkMatrix44(SkMatrix44::kIdentity_Constructor);
(...skipping 19 matching lines...) Expand all
56 // The contents rect property for the CALayer. 56 // The contents rect property for the CALayer.
57 gfx::RectF contents_rect; 57 gfx::RectF contents_rect;
58 // The bounds for the CALayer in pixels. 58 // The bounds for the CALayer in pixels.
59 gfx::RectF bounds_rect; 59 gfx::RectF bounds_rect;
60 // The background color property for the CALayer. 60 // The background color property for the CALayer.
61 SkColor background_color = SK_ColorTRANSPARENT; 61 SkColor background_color = SK_ColorTRANSPARENT;
62 // The edge anti-aliasing mask property for the CALayer. 62 // The edge anti-aliasing mask property for the CALayer.
63 unsigned edge_aa_mask = 0; 63 unsigned edge_aa_mask = 0;
64 // The minification and magnification filters for the CALayer. 64 // The minification and magnification filters for the CALayer.
65 unsigned filter; 65 unsigned filter;
66 // If |rpdq| is present, then the renderer must draw the filter effects and
67 // copy the result into an IOSurface.
68 const RenderPassDrawQuad* rpdq = nullptr;
66 }; 69 };
67 70
68 typedef std::vector<CALayerOverlay> CALayerOverlayList; 71 typedef std::vector<CALayerOverlay> CALayerOverlayList;
69 72
70 // Returns true if all quads in the root render pass have been replaced by 73 // Returns true if all quads in the root render pass have been replaced by
71 // CALayerOverlays. 74 // CALayerOverlays.
72 bool ProcessForCALayerOverlays(ResourceProvider* resource_provider, 75 bool ProcessForCALayerOverlays(ResourceProvider* resource_provider,
73 const gfx::RectF& display_rect, 76 const gfx::RectF& display_rect,
74 const QuadList& quad_list, 77 const QuadList& quad_list,
75 CALayerOverlayList* ca_layer_overlays); 78 CALayerOverlayList* ca_layer_overlays);
76 79
77 // Allows RenderPassDrawQuads to be converted to CALayerOverlays. 80 // Allows RenderPassDrawQuads to be converted to CALayerOverlays.
78 void CC_EXPORT EnableRenderPassDrawQuadForTesting(); 81 void CC_EXPORT EnableRenderPassDrawQuadForTesting();
79 82
80 } // namespace cc 83 } // namespace cc
81 84
82 #endif // CC_OUTPUT_CA_LAYER_OVERLAY_H_ 85 #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