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

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

Issue 2128113002: Use a cc::Display for WebView resourceless software draws. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: displaywebview: mojom 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 | « cc/output/delegating_renderer.cc ('k') | cc/output/direct_renderer.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 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 <unordered_map> 8 #include <unordered_map>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 20 matching lines...) Expand all
31 public: 31 public:
32 ~DirectRenderer() override; 32 ~DirectRenderer() override;
33 33
34 void DecideRenderPassAllocationsForFrame( 34 void DecideRenderPassAllocationsForFrame(
35 const RenderPassList& render_passes_in_draw_order) override; 35 const RenderPassList& render_passes_in_draw_order) override;
36 bool HasAllocatedResourcesForTesting(RenderPassId id) const override; 36 bool HasAllocatedResourcesForTesting(RenderPassId id) const override;
37 void DrawFrame(RenderPassList* render_passes_in_draw_order, 37 void DrawFrame(RenderPassList* render_passes_in_draw_order,
38 float device_scale_factor, 38 float device_scale_factor,
39 const gfx::ColorSpace& device_color_space, 39 const gfx::ColorSpace& device_color_space,
40 const gfx::Rect& device_viewport_rect, 40 const gfx::Rect& device_viewport_rect,
41 const gfx::Rect& device_clip_rect, 41 const gfx::Rect& device_clip_rect) override;
42 bool disable_picture_quad_image_filtering) override;
43 virtual void SwapBuffersComplete() {} 42 virtual void SwapBuffersComplete() {}
44 virtual void DidReceiveTextureInUseResponses( 43 virtual void DidReceiveTextureInUseResponses(
45 const gpu::TextureInUseResponses& responses) {} 44 const gpu::TextureInUseResponses& responses) {}
46 45
47 // If a pass contains a single tile draw quad and can be drawn without 46 // If a pass contains a single tile draw quad and can be drawn without
48 // a render pass (e.g. applying a filter directly to the tile quad) 47 // a render pass (e.g. applying a filter directly to the tile quad)
49 // return that quad, otherwise return null. 48 // return that quad, otherwise return null.
50 virtual const TileDrawQuad* CanPassBeDrawnDirectly(const RenderPass* pass); 49 virtual const TileDrawQuad* CanPassBeDrawnDirectly(const RenderPass* pass);
51 50
52 struct CC_EXPORT DrawingFrame { 51 struct CC_EXPORT DrawingFrame {
53 DrawingFrame(); 52 DrawingFrame();
54 ~DrawingFrame(); 53 ~DrawingFrame();
55 54
56 const RenderPassList* render_passes_in_draw_order; 55 const RenderPassList* render_passes_in_draw_order;
57 const RenderPass* root_render_pass; 56 const RenderPass* root_render_pass;
58 const RenderPass* current_render_pass; 57 const RenderPass* current_render_pass;
59 const ScopedResource* current_texture; 58 const ScopedResource* current_texture;
60 59
61 gfx::Rect root_damage_rect; 60 gfx::Rect root_damage_rect;
62 gfx::Rect device_viewport_rect; 61 gfx::Rect device_viewport_rect;
63 gfx::Rect device_clip_rect; 62 gfx::Rect device_clip_rect;
64 63
65 gfx::Transform projection_matrix; 64 gfx::Transform projection_matrix;
66 gfx::Transform window_matrix; 65 gfx::Transform window_matrix;
67 66
68 bool disable_picture_quad_image_filtering;
69
70 OverlayCandidateList overlay_list; 67 OverlayCandidateList overlay_list;
71 CALayerOverlayList ca_layer_overlay_list; 68 CALayerOverlayList ca_layer_overlay_list;
72 }; 69 };
73 70
74 // Allow tests to enlarge the texture size of non-root render passes to 71 // Allow tests to enlarge the texture size of non-root render passes to
75 // verify cases where the texture doesn't match the render pass size. 72 // verify cases where the texture doesn't match the render pass size.
76 void SetEnlargePassTextureAmount(const gfx::Size& amount) { 73 void SetEnlargePassTextureAmount(const gfx::Size& amount) {
77 enlarge_pass_texture_amount_ = amount; 74 enlarge_pass_texture_amount_ = amount;
78 } 75 }
79 76
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 177
181 private: 178 private:
182 gfx::Size enlarge_pass_texture_amount_; 179 gfx::Size enlarge_pass_texture_amount_;
183 180
184 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); 181 DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
185 }; 182 };
186 183
187 } // namespace cc 184 } // namespace cc
188 185
189 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ 186 #endif // CC_OUTPUT_DIRECT_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698