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

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

Issue 404563005: Make RenderPass::Id an isolated class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more case in mojo Created 6 years, 4 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/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_RENDERER_H_ 5 #ifndef CC_OUTPUT_RENDERER_H_
6 #define CC_OUTPUT_RENDERER_H_ 6 #define CC_OUTPUT_RENDERER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/quads/render_pass.h" 10 #include "cc/base/scoped_ptr_vector.h"
11 #include "cc/trees/layer_tree_host.h" 11 #include "cc/trees/layer_tree_host.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 class CompositorFrameAck; 15 class CompositorFrameAck;
16 class CompositorFrameMetadata; 16 class CompositorFrameMetadata;
17 class RenderPass;
18 class RenderPassId;
17 class ScopedResource; 19 class ScopedResource;
18 class Task; 20 class Task;
19 21
22 typedef ScopedPtrVector<RenderPass> RenderPassList;
23
20 struct RendererCapabilitiesImpl { 24 struct RendererCapabilitiesImpl {
21 RendererCapabilitiesImpl(); 25 RendererCapabilitiesImpl();
22 ~RendererCapabilitiesImpl(); 26 ~RendererCapabilitiesImpl();
23 27
24 // Capabilities copied to main thread. 28 // Capabilities copied to main thread.
25 ResourceFormat best_texture_format; 29 ResourceFormat best_texture_format;
26 bool allow_partial_texture_updates; 30 bool allow_partial_texture_updates;
27 int max_texture_size; 31 int max_texture_size;
28 bool using_shared_memory_resources; 32 bool using_shared_memory_resources;
29 33
(...skipping 14 matching lines...) Expand all
44 }; 48 };
45 49
46 class CC_EXPORT Renderer { 50 class CC_EXPORT Renderer {
47 public: 51 public:
48 virtual ~Renderer() {} 52 virtual ~Renderer() {}
49 53
50 virtual const RendererCapabilitiesImpl& Capabilities() const = 0; 54 virtual const RendererCapabilitiesImpl& Capabilities() const = 0;
51 55
52 virtual void DecideRenderPassAllocationsForFrame( 56 virtual void DecideRenderPassAllocationsForFrame(
53 const RenderPassList& render_passes_in_draw_order) {} 57 const RenderPassList& render_passes_in_draw_order) {}
54 virtual bool HasAllocatedResourcesForTesting(RenderPass::Id id) const; 58 virtual bool HasAllocatedResourcesForTesting(RenderPassId id) const;
55 59
56 // This passes ownership of the render passes to the renderer. It should 60 // This passes ownership of the render passes to the renderer. It should
57 // consume them, and empty the list. The parameters here may change from frame 61 // consume them, and empty the list. The parameters here may change from frame
58 // to frame and should not be cached. 62 // to frame and should not be cached.
59 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped 63 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped
60 // window space. 64 // window space.
61 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, 65 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order,
62 float device_scale_factor, 66 float device_scale_factor,
63 const gfx::Rect& device_viewport_rect, 67 const gfx::Rect& device_viewport_rect,
64 const gfx::Rect& device_clip_rect, 68 const gfx::Rect& device_clip_rect,
(...skipping 21 matching lines...) Expand all
86 const LayerTreeSettings* settings_; 90 const LayerTreeSettings* settings_;
87 bool visible_; 91 bool visible_;
88 92
89 private: 93 private:
90 DISALLOW_COPY_AND_ASSIGN(Renderer); 94 DISALLOW_COPY_AND_ASSIGN(Renderer);
91 }; 95 };
92 96
93 } // namespace cc 97 } // namespace cc
94 98
95 #endif // CC_OUTPUT_RENDERER_H_ 99 #endif // CC_OUTPUT_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/overlay_unittest.cc ('k') | cc/output/renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698