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

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

Issue 2402673002: Implemented Missing Virtual Functions Declaration in DirectRenderer Class.
Patch Set: Removed unwanted changes/files Created 4 years, 2 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 | no next file » | 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 <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 float device_scale_factor, 56 float device_scale_factor,
57 const gfx::ColorSpace& device_color_space, 57 const gfx::ColorSpace& device_color_space,
58 const gfx::Rect& device_viewport_rect, 58 const gfx::Rect& device_viewport_rect,
59 const gfx::Rect& device_clip_rect); 59 const gfx::Rect& device_clip_rect);
60 60
61 // Public interface implemented by subclasses. 61 // Public interface implemented by subclasses.
62 virtual void SwapBuffers(CompositorFrameMetadata metadata) = 0; 62 virtual void SwapBuffers(CompositorFrameMetadata metadata) = 0;
63 virtual void SwapBuffersComplete() {} 63 virtual void SwapBuffersComplete() {}
64 virtual void DidReceiveTextureInUseResponses( 64 virtual void DidReceiveTextureInUseResponses(
65 const gpu::TextureInUseResponses& responses) {} 65 const gpu::TextureInUseResponses& responses) {}
66 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {}
66 67
67 // Allow tests to enlarge the texture size of non-root render passes to 68 // 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. 69 // verify cases where the texture doesn't match the render pass size.
69 void SetEnlargePassTextureAmountForTesting(const gfx::Size& amount) { 70 void SetEnlargePassTextureAmountForTesting(const gfx::Size& amount) {
70 enlarge_pass_texture_amount_ = amount; 71 enlarge_pass_texture_amount_ = amount;
71 } 72 }
72 73
73 // Public for tests that poke at internals. 74 // Public for tests that poke at internals.
74 struct CC_EXPORT DrawingFrame { 75 struct CC_EXPORT DrawingFrame {
75 DrawingFrame(); 76 DrawingFrame();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 virtual void FinishDrawingFrame(DrawingFrame* frame) = 0; 162 virtual void FinishDrawingFrame(DrawingFrame* frame) = 0;
162 // If a pass contains a single tile draw quad and can be drawn without 163 // If a pass contains a single tile draw quad and can be drawn without
163 // a render pass (e.g. applying a filter directly to the tile quad) 164 // a render pass (e.g. applying a filter directly to the tile quad)
164 // return that quad, otherwise return null. 165 // return that quad, otherwise return null.
165 virtual const TileDrawQuad* CanPassBeDrawnDirectly(const RenderPass* pass); 166 virtual const TileDrawQuad* CanPassBeDrawnDirectly(const RenderPass* pass);
166 virtual void FinishDrawingQuadList() {} 167 virtual void FinishDrawingQuadList() {}
167 virtual bool FlippedFramebuffer(const DrawingFrame* frame) const = 0; 168 virtual bool FlippedFramebuffer(const DrawingFrame* frame) const = 0;
168 virtual void EnsureScissorTestEnabled() = 0; 169 virtual void EnsureScissorTestEnabled() = 0;
169 virtual void EnsureScissorTestDisabled() = 0; 170 virtual void EnsureScissorTestDisabled() = 0;
170 virtual void DidChangeVisibility() = 0; 171 virtual void DidChangeVisibility() = 0;
172 virtual void DiscardBackbuffer() {}
173 virtual void EnsureBackbuffer() {}
174
171 virtual void CopyCurrentRenderPassToBitmap( 175 virtual void CopyCurrentRenderPassToBitmap(
172 DrawingFrame* frame, 176 DrawingFrame* frame,
173 std::unique_ptr<CopyOutputRequest> request) = 0; 177 std::unique_ptr<CopyOutputRequest> request) = 0;
174 178
175 const RendererSettings* const settings_; 179 const RendererSettings* const settings_;
176 OutputSurface* const output_surface_; 180 OutputSurface* const output_surface_;
177 ResourceProvider* const resource_provider_; 181 ResourceProvider* const resource_provider_;
178 // This can be replaced by test implementations. 182 // This can be replaced by test implementations.
179 std::unique_ptr<OverlayProcessor> overlay_processor_; 183 std::unique_ptr<OverlayProcessor> overlay_processor_;
180 184
(...skipping 26 matching lines...) Expand all
207 private: 211 private:
208 bool initialized_ = false; 212 bool initialized_ = false;
209 gfx::Size enlarge_pass_texture_amount_; 213 gfx::Size enlarge_pass_texture_amount_;
210 214
211 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); 215 DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
212 }; 216 };
213 217
214 } // namespace cc 218 } // namespace cc
215 219
216 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ 220 #endif // CC_OUTPUT_DIRECT_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698