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

Side by Side Diff: cc/output/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/overlay_unittest.cc ('k') | cc/output/software_renderer.h » ('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_RENDERER_H_ 5 #ifndef CC_OUTPUT_RENDERER_H_
6 #define CC_OUTPUT_RENDERER_H_ 6 #define CC_OUTPUT_RENDERER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 // This passes ownership of the render passes to the renderer. It should 67 // This passes ownership of the render passes to the renderer. It should
68 // consume them, and empty the list. The parameters here may change from frame 68 // consume them, and empty the list. The parameters here may change from frame
69 // to frame and should not be cached. 69 // to frame and should not be cached.
70 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped 70 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped
71 // window space. 71 // window space.
72 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, 72 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order,
73 float device_scale_factor, 73 float device_scale_factor,
74 const gfx::ColorSpace& device_color_space, 74 const gfx::ColorSpace& device_color_space,
75 const gfx::Rect& device_viewport_rect, 75 const gfx::Rect& device_viewport_rect,
76 const gfx::Rect& device_clip_rect, 76 const gfx::Rect& device_clip_rect) = 0;
77 bool disable_picture_quad_image_filtering) = 0;
78 77
79 // Waits for rendering to finish. 78 // Waits for rendering to finish.
80 virtual void Finish() = 0; 79 virtual void Finish() = 0;
81 80
82 // Puts backbuffer onscreen. 81 // Puts backbuffer onscreen.
83 virtual void SwapBuffers(CompositorFrameMetadata metadata) = 0; 82 virtual void SwapBuffers(CompositorFrameMetadata metadata) = 0;
84 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} 83 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {}
85 84
86 bool visible() const { return visible_; } 85 bool visible() const { return visible_; }
87 void SetVisible(bool visible); 86 void SetVisible(bool visible);
88 87
89 protected: 88 protected:
90 Renderer(RendererClient* client, const RendererSettings* settings) 89 Renderer(RendererClient* client, const RendererSettings* settings)
91 : client_(client), settings_(settings), visible_(true) {} 90 : client_(client), settings_(settings), visible_(true) {}
92 91
93 virtual void DidChangeVisibility() = 0; 92 virtual void DidChangeVisibility() = 0;
94 93
95 RendererClient* client_; 94 RendererClient* client_;
96 const RendererSettings* settings_; 95 const RendererSettings* settings_;
97 bool visible_; 96 bool visible_;
98 97
99 private: 98 private:
100 DISALLOW_COPY_AND_ASSIGN(Renderer); 99 DISALLOW_COPY_AND_ASSIGN(Renderer);
101 }; 100 };
102 101
103 } // namespace cc 102 } // namespace cc
104 103
105 #endif // CC_OUTPUT_RENDERER_H_ 104 #endif // CC_OUTPUT_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/overlay_unittest.cc ('k') | cc/output/software_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698