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

Side by Side Diff: cc/output/direct_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/delegating_renderer_unittest.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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // This is the base class for code shared between the GL and software 22 // This is the base class for code shared between the GL and software
23 // renderer implementations. "Direct" refers to the fact that it does not 23 // renderer implementations. "Direct" refers to the fact that it does not
24 // delegate rendering to another compositor. 24 // delegate rendering to another compositor.
25 class CC_EXPORT DirectRenderer : public Renderer { 25 class CC_EXPORT DirectRenderer : public Renderer {
26 public: 26 public:
27 virtual ~DirectRenderer(); 27 virtual ~DirectRenderer();
28 28
29 virtual void DecideRenderPassAllocationsForFrame( 29 virtual void DecideRenderPassAllocationsForFrame(
30 const RenderPassList& render_passes_in_draw_order) OVERRIDE; 30 const RenderPassList& render_passes_in_draw_order) OVERRIDE;
31 virtual bool HasAllocatedResourcesForTesting(RenderPass::Id id) const 31 virtual bool HasAllocatedResourcesForTesting(RenderPassId id) const OVERRIDE;
32 OVERRIDE;
33 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, 32 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order,
34 float device_scale_factor, 33 float device_scale_factor,
35 const gfx::Rect& device_viewport_rect, 34 const gfx::Rect& device_viewport_rect,
36 const gfx::Rect& device_clip_rect, 35 const gfx::Rect& device_clip_rect,
37 bool disable_picture_quad_image_filtering) OVERRIDE; 36 bool disable_picture_quad_image_filtering) OVERRIDE;
38 37
39 struct CC_EXPORT DrawingFrame { 38 struct CC_EXPORT DrawingFrame {
40 DrawingFrame(); 39 DrawingFrame();
41 ~DrawingFrame(); 40 ~DrawingFrame();
42 41
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 virtual bool FlippedFramebuffer() const = 0; 108 virtual bool FlippedFramebuffer() const = 0;
110 virtual void EnsureScissorTestEnabled() = 0; 109 virtual void EnsureScissorTestEnabled() = 0;
111 virtual void EnsureScissorTestDisabled() = 0; 110 virtual void EnsureScissorTestDisabled() = 0;
112 virtual void DiscardBackbuffer() {} 111 virtual void DiscardBackbuffer() {}
113 virtual void EnsureBackbuffer() {} 112 virtual void EnsureBackbuffer() {}
114 113
115 virtual void CopyCurrentRenderPassToBitmap( 114 virtual void CopyCurrentRenderPassToBitmap(
116 DrawingFrame* frame, 115 DrawingFrame* frame,
117 scoped_ptr<CopyOutputRequest> request) = 0; 116 scoped_ptr<CopyOutputRequest> request) = 0;
118 117
119 base::ScopedPtrHashMap<RenderPass::Id, ScopedResource> render_pass_textures_; 118 base::ScopedPtrHashMap<RenderPassId, ScopedResource> render_pass_textures_;
120 OutputSurface* output_surface_; 119 OutputSurface* output_surface_;
121 ResourceProvider* resource_provider_; 120 ResourceProvider* resource_provider_;
122 scoped_ptr<OverlayProcessor> overlay_processor_; 121 scoped_ptr<OverlayProcessor> overlay_processor_;
123 122
124 // For use in coordinate conversion, this stores the output rect, viewport 123 // For use in coordinate conversion, this stores the output rect, viewport
125 // rect (= unflipped version of glViewport rect), and the size of target 124 // rect (= unflipped version of glViewport rect), and the size of target
126 // framebuffer. During a draw, this stores the values for the current render 125 // framebuffer. During a draw, this stores the values for the current render
127 // pass; in between draws, they retain the values for the root render pass of 126 // pass; in between draws, they retain the values for the root render pass of
128 // the last draw. 127 // the last draw.
129 gfx::Rect current_draw_rect_; 128 gfx::Rect current_draw_rect_;
130 gfx::Rect current_viewport_rect_; 129 gfx::Rect current_viewport_rect_;
131 gfx::Size current_surface_size_; 130 gfx::Size current_surface_size_;
132 131
133 private: 132 private:
134 gfx::Vector2d enlarge_pass_texture_amount_; 133 gfx::Vector2d enlarge_pass_texture_amount_;
135 134
136 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); 135 DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
137 }; 136 };
138 137
139 } // namespace cc 138 } // namespace cc
140 139
141 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ 140 #endif // CC_OUTPUT_DIRECT_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer_unittest.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698