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

Side by Side Diff: cc/quads/render_pass.h

Issue 2693723002: cc: Move output color space from DrawingFrame to RenderPass (Closed)
Patch Set: Fix test compile Created 3 years, 10 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 | « cc/output/software_renderer_unittest.cc ('k') | cc/quads/render_pass.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_QUADS_RENDER_PASS_H_ 5 #ifndef CC_QUADS_RENDER_PASS_H_
6 #define CC_QUADS_RENDER_PASS_H_ 6 #define CC_QUADS_RENDER_PASS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <unordered_map> 10 #include <unordered_map>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/hash.h" 15 #include "base/hash.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "cc/base/cc_export.h" 17 #include "cc/base/cc_export.h"
18 #include "cc/base/list_container.h" 18 #include "cc/base/list_container.h"
19 #include "cc/output/filter_operations.h" 19 #include "cc/output/filter_operations.h"
20 #include "cc/quads/draw_quad.h" 20 #include "cc/quads/draw_quad.h"
21 #include "cc/quads/largest_draw_quad.h" 21 #include "cc/quads/largest_draw_quad.h"
22 #include "ui/gfx/color_space.h"
22 #include "ui/gfx/geometry/rect.h" 23 #include "ui/gfx/geometry/rect.h"
23 #include "ui/gfx/geometry/rect_f.h" 24 #include "ui/gfx/geometry/rect_f.h"
24 #include "ui/gfx/transform.h" 25 #include "ui/gfx/transform.h"
25 26
26 namespace base { 27 namespace base {
27 namespace trace_event { 28 namespace trace_event {
28 class TracedValue; 29 class TracedValue;
29 } 30 }
30 } 31 }
31 32
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const gfx::Rect& output_rect, 78 const gfx::Rect& output_rect,
78 const gfx::Rect& damage_rect, 79 const gfx::Rect& damage_rect,
79 const gfx::Transform& transform_to_root_target); 80 const gfx::Transform& transform_to_root_target);
80 81
81 void SetAll(int id, 82 void SetAll(int id,
82 const gfx::Rect& output_rect, 83 const gfx::Rect& output_rect,
83 const gfx::Rect& damage_rect, 84 const gfx::Rect& damage_rect,
84 const gfx::Transform& transform_to_root_target, 85 const gfx::Transform& transform_to_root_target,
85 const FilterOperations& filters, 86 const FilterOperations& filters,
86 const FilterOperations& background_filters, 87 const FilterOperations& background_filters,
88 const gfx::ColorSpace& color_space,
87 bool has_transparent_background); 89 bool has_transparent_background);
88 90
89 void AsValueInto(base::trace_event::TracedValue* dict) const; 91 void AsValueInto(base::trace_event::TracedValue* dict) const;
90 92
91 SharedQuadState* CreateAndAppendSharedQuadState(); 93 SharedQuadState* CreateAndAppendSharedQuadState();
92 94
93 template <typename DrawQuadType> 95 template <typename DrawQuadType>
94 DrawQuadType* CreateAndAppendDrawQuad() { 96 DrawQuadType* CreateAndAppendDrawQuad() {
95 return quad_list.AllocateAndConstruct<DrawQuadType>(); 97 return quad_list.AllocateAndConstruct<DrawQuadType>();
96 } 98 }
(...skipping 16 matching lines...) Expand all
113 // render pass' |output_rect|. 115 // render pass' |output_rect|.
114 gfx::Transform transform_to_root_target; 116 gfx::Transform transform_to_root_target;
115 117
116 // Post-processing filters, applied to the pixels in the render pass' texture. 118 // Post-processing filters, applied to the pixels in the render pass' texture.
117 FilterOperations filters; 119 FilterOperations filters;
118 120
119 // Post-processing filters, applied to the pixels showing through the 121 // Post-processing filters, applied to the pixels showing through the
120 // background of the render pass, from behind it. 122 // background of the render pass, from behind it.
121 FilterOperations background_filters; 123 FilterOperations background_filters;
122 124
125 // The color space into which content will be render for this render pass.
enne (OOO) 2017/02/13 05:07:06 rendered?
ccameron 2017/02/13 18:15:55 Done.
126 gfx::ColorSpace color_space;
127
123 // If false, the pixels in the render pass' texture are all opaque. 128 // If false, the pixels in the render pass' texture are all opaque.
124 bool has_transparent_background = true; 129 bool has_transparent_background = true;
125 130
126 // If non-empty, the renderer should produce a copy of the render pass' 131 // If non-empty, the renderer should produce a copy of the render pass'
127 // contents as a bitmap, and give a copy of the bitmap to each callback in 132 // contents as a bitmap, and give a copy of the bitmap to each callback in
128 // this list. This property should not be serialized between compositors, as 133 // this list. This property should not be serialized between compositors, as
129 // it only makes sense in the root compositor. 134 // it only makes sense in the root compositor.
130 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests; 135 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
131 136
132 QuadList quad_list; 137 QuadList quad_list;
(...skipping 15 matching lines...) Expand all
148 153
149 using RenderPassList = std::vector<std::unique_ptr<RenderPass>>; 154 using RenderPassList = std::vector<std::unique_ptr<RenderPass>>;
150 155
151 // List of pairs of render pass id and filter, sorted by render pass id so that 156 // List of pairs of render pass id and filter, sorted by render pass id so that
152 // it can be searched using std::lower_bound. 157 // it can be searched using std::lower_bound.
153 using RenderPassFilterList = std::vector<std::pair<int, FilterOperations*>>; 158 using RenderPassFilterList = std::vector<std::pair<int, FilterOperations*>>;
154 159
155 } // namespace cc 160 } // namespace cc
156 161
157 #endif // CC_QUADS_RENDER_PASS_H_ 162 #endif // CC_QUADS_RENDER_PASS_H_
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/quads/render_pass.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698