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

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

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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/copy_output_request.h ('k') | cc/output/delegating_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_DELEGATING_RENDERER_H_ 5 #ifndef CC_OUTPUT_DELEGATING_RENDERER_H_
6 #define CC_OUTPUT_DELEGATING_RENDERER_H_ 6 #define CC_OUTPUT_DELEGATING_RENDERER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 13 matching lines...) Expand all
24 ResourceProvider* resource_provider); 24 ResourceProvider* resource_provider);
25 virtual ~DelegatingRenderer(); 25 virtual ~DelegatingRenderer();
26 26
27 virtual const RendererCapabilities& Capabilities() const OVERRIDE; 27 virtual const RendererCapabilities& Capabilities() const OVERRIDE;
28 28
29 virtual bool CanReadPixels() const OVERRIDE; 29 virtual bool CanReadPixels() const OVERRIDE;
30 30
31 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, 31 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order,
32 ContextProvider* offscreen_context_provider, 32 ContextProvider* offscreen_context_provider,
33 float device_scale_factor, 33 float device_scale_factor,
34 gfx::Rect device_viewport_rect, 34 const gfx::Rect& device_viewport_rect,
35 gfx::Rect device_clip_rect, 35 const gfx::Rect& device_clip_rect,
36 bool allow_partial_swap, 36 bool allow_partial_swap,
37 bool disable_picture_quad_image_filtering) OVERRIDE; 37 bool disable_picture_quad_image_filtering) OVERRIDE;
38 38
39 virtual void Finish() OVERRIDE {} 39 virtual void Finish() OVERRIDE {}
40 40
41 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) OVERRIDE; 41 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) OVERRIDE;
42 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck&) OVERRIDE; 42 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck&) OVERRIDE;
43 43
44 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE; 44 virtual void GetFramebufferPixels(void* pixels,
45 const gfx::Rect& rect) OVERRIDE;
45 46
46 virtual bool IsContextLost() OVERRIDE; 47 virtual bool IsContextLost() OVERRIDE;
47 48
48 virtual void SetVisible(bool visible) OVERRIDE; 49 virtual void SetVisible(bool visible) OVERRIDE;
49 50
50 virtual void SendManagedMemoryStats(size_t bytes_visible, 51 virtual void SendManagedMemoryStats(size_t bytes_visible,
51 size_t bytes_visible_and_nearby, 52 size_t bytes_visible_and_nearby,
52 size_t bytes_allocated) OVERRIDE; 53 size_t bytes_allocated) OVERRIDE;
53 54
54 private: 55 private:
55 DelegatingRenderer(RendererClient* client, 56 DelegatingRenderer(RendererClient* client,
56 const LayerTreeSettings* settings, 57 const LayerTreeSettings* settings,
57 OutputSurface* output_surface, 58 OutputSurface* output_surface,
58 ResourceProvider* resource_provider); 59 ResourceProvider* resource_provider);
59 bool Initialize(); 60 bool Initialize();
60 61
61 OutputSurface* output_surface_; 62 OutputSurface* output_surface_;
62 ResourceProvider* resource_provider_; 63 ResourceProvider* resource_provider_;
63 RendererCapabilities capabilities_; 64 RendererCapabilities capabilities_;
64 scoped_ptr<DelegatedFrameData> delegated_frame_data_; 65 scoped_ptr<DelegatedFrameData> delegated_frame_data_;
65 bool visible_; 66 bool visible_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); 68 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer);
68 }; 69 };
69 70
70 } // namespace cc 71 } // namespace cc
71 72
72 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ 73 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/copy_output_request.h ('k') | cc/output/delegating_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698