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

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

Issue 2693723002: cc: Move output color space from DrawingFrame to RenderPass (Closed)
Patch Set: Fix typo 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_DIRECT_RENDERER_H_ 5 #ifndef CC_OUTPUT_DIRECT_RENDERER_H_
6 #define CC_OUTPUT_DIRECT_RENDERER_H_ 6 #define CC_OUTPUT_DIRECT_RENDERER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <vector> 10 #include <vector>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void Initialize(); 48 void Initialize();
49 49
50 bool use_partial_swap() const { return use_partial_swap_; } 50 bool use_partial_swap() const { return use_partial_swap_; }
51 51
52 void SetVisible(bool visible); 52 void SetVisible(bool visible);
53 void DecideRenderPassAllocationsForFrame( 53 void DecideRenderPassAllocationsForFrame(
54 const RenderPassList& render_passes_in_draw_order); 54 const RenderPassList& render_passes_in_draw_order);
55 bool HasAllocatedResourcesForTesting(int render_pass_id) const; 55 bool HasAllocatedResourcesForTesting(int render_pass_id) const;
56 void DrawFrame(RenderPassList* render_passes_in_draw_order, 56 void DrawFrame(RenderPassList* render_passes_in_draw_order,
57 float device_scale_factor, 57 float device_scale_factor,
58 const gfx::ColorSpace& device_color_space,
59 const gfx::Size& device_viewport_size); 58 const gfx::Size& device_viewport_size);
60 59
61 // Public interface implemented by subclasses. 60 // Public interface implemented by subclasses.
62 virtual void SwapBuffers(std::vector<ui::LatencyInfo> latency_info) = 0; 61 virtual void SwapBuffers(std::vector<ui::LatencyInfo> latency_info) = 0;
63 virtual void SwapBuffersComplete() {} 62 virtual void SwapBuffersComplete() {}
64 virtual void DidReceiveTextureInUseResponses( 63 virtual void DidReceiveTextureInUseResponses(
65 const gpu::TextureInUseResponses& responses) {} 64 const gpu::TextureInUseResponses& responses) {}
66 65
67 // Allow tests to enlarge the texture size of non-root render passes to 66 // Allow tests to enlarge the texture size of non-root render passes to
68 // verify cases where the texture doesn't match the render pass size. 67 // verify cases where the texture doesn't match the render pass size.
69 void SetEnlargePassTextureAmountForTesting(const gfx::Size& amount) { 68 void SetEnlargePassTextureAmountForTesting(const gfx::Size& amount) {
70 enlarge_pass_texture_amount_ = amount; 69 enlarge_pass_texture_amount_ = amount;
71 } 70 }
72 71
73 // Public for tests that poke at internals. 72 // Public for tests that poke at internals.
74 struct CC_EXPORT DrawingFrame { 73 struct CC_EXPORT DrawingFrame {
75 DrawingFrame(); 74 DrawingFrame();
76 ~DrawingFrame(); 75 ~DrawingFrame();
77 gfx::Rect ComputeScissorRectForRenderPass() const; 76 gfx::Rect ComputeScissorRectForRenderPass() const;
78 77
79 const RenderPassList* render_passes_in_draw_order = nullptr; 78 const RenderPassList* render_passes_in_draw_order = nullptr;
80 const RenderPass* root_render_pass = nullptr; 79 const RenderPass* root_render_pass = nullptr;
81 const RenderPass* current_render_pass = nullptr; 80 const RenderPass* current_render_pass = nullptr;
82 const ScopedResource* current_texture = nullptr; 81 const ScopedResource* current_texture = nullptr;
83 82
84 gfx::Rect root_damage_rect; 83 gfx::Rect root_damage_rect;
85 gfx::Size device_viewport_size; 84 gfx::Size device_viewport_size;
86 gfx::ColorSpace device_color_space;
87 85
88 gfx::Transform projection_matrix; 86 gfx::Transform projection_matrix;
89 gfx::Transform window_matrix; 87 gfx::Transform window_matrix;
90 88
91 OverlayCandidateList overlay_list; 89 OverlayCandidateList overlay_list;
92 CALayerOverlayList ca_layer_overlay_list; 90 CALayerOverlayList ca_layer_overlay_list;
93 }; 91 };
94 92
95 protected: 93 protected:
96 friend class BspWalkActionDrawPolygon; 94 friend class BspWalkActionDrawPolygon;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 gfx::ColorSpace reshape_device_color_space_; 232 gfx::ColorSpace reshape_device_color_space_;
235 bool reshape_has_alpha_ = false; 233 bool reshape_has_alpha_ = false;
236 bool reshape_use_stencil_ = false; 234 bool reshape_use_stencil_ = false;
237 235
238 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); 236 DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
239 }; 237 };
240 238
241 } // namespace cc 239 } // namespace cc
242 240
243 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ 241 #endif // CC_OUTPUT_DIRECT_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698