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

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

Issue 208213003: Plumb overlay processing into DirectRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More plumbing Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/output/direct_renderer.cc » ('j') | cc/output/gl_renderer.cc » ('J')
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"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/output/overlay_processor.h"
12 #include "cc/output/renderer.h" 13 #include "cc/output/renderer.h"
13 #include "cc/resources/resource_provider.h" 14 #include "cc/resources/resource_provider.h"
14 #include "cc/resources/scoped_resource.h" 15 #include "cc/resources/scoped_resource.h"
15 #include "cc/resources/task_graph_runner.h" 16 #include "cc/resources/task_graph_runner.h"
16 17
17 namespace cc { 18 namespace cc {
18 19
19 class ResourceProvider; 20 class ResourceProvider;
20 21
21 // 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
(...skipping 14 matching lines...) Expand all
36 ContextProvider* offscreen_context_provider, 37 ContextProvider* offscreen_context_provider,
37 float device_scale_factor, 38 float device_scale_factor,
38 const gfx::Rect& device_viewport_rect, 39 const gfx::Rect& device_viewport_rect,
39 const gfx::Rect& device_clip_rect, 40 const gfx::Rect& device_clip_rect,
40 bool disable_picture_quad_image_filtering) OVERRIDE; 41 bool disable_picture_quad_image_filtering) OVERRIDE;
41 42
42 struct CC_EXPORT DrawingFrame { 43 struct CC_EXPORT DrawingFrame {
43 DrawingFrame(); 44 DrawingFrame();
44 ~DrawingFrame(); 45 ~DrawingFrame();
45 46
47 const RenderPassList* overlay_passes_in_draw_order;
46 const RenderPass* root_render_pass; 48 const RenderPass* root_render_pass;
47 const RenderPass* current_render_pass; 49 const RenderPass* current_render_pass;
48 const ScopedResource* current_texture; 50 const ScopedResource* current_texture;
49 51
50 gfx::RectF root_damage_rect; 52 gfx::RectF root_damage_rect;
51 gfx::Rect device_viewport_rect; 53 gfx::Rect device_viewport_rect;
52 gfx::Rect device_clip_rect; 54 gfx::Rect device_clip_rect;
53 55
54 gfx::Transform projection_matrix; 56 gfx::Transform projection_matrix;
55 gfx::Transform window_matrix; 57 gfx::Transform window_matrix;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 virtual void DiscardBackbuffer() {} 118 virtual void DiscardBackbuffer() {}
117 virtual void EnsureBackbuffer() {} 119 virtual void EnsureBackbuffer() {}
118 120
119 virtual void CopyCurrentRenderPassToBitmap( 121 virtual void CopyCurrentRenderPassToBitmap(
120 DrawingFrame* frame, 122 DrawingFrame* frame,
121 scoped_ptr<CopyOutputRequest> request) = 0; 123 scoped_ptr<CopyOutputRequest> request) = 0;
122 124
123 base::ScopedPtrHashMap<RenderPass::Id, ScopedResource> render_pass_textures_; 125 base::ScopedPtrHashMap<RenderPass::Id, ScopedResource> render_pass_textures_;
124 OutputSurface* output_surface_; 126 OutputSurface* output_surface_;
125 ResourceProvider* resource_provider_; 127 ResourceProvider* resource_provider_;
128 scoped_ptr<OverlayProcessor> overlay_processor_;
126 129
127 // For use in coordinate conversion, this stores the output rect, viewport 130 // For use in coordinate conversion, this stores the output rect, viewport
128 // rect (= unflipped version of glViewport rect), and the size of target 131 // rect (= unflipped version of glViewport rect), and the size of target
129 // framebuffer. During a draw, this stores the values for the current render 132 // framebuffer. During a draw, this stores the values for the current render
130 // pass; in between draws, they retain the values for the root render pass of 133 // pass; in between draws, they retain the values for the root render pass of
131 // the last draw. 134 // the last draw.
132 gfx::Rect current_draw_rect_; 135 gfx::Rect current_draw_rect_;
133 gfx::Rect current_viewport_rect_; 136 gfx::Rect current_viewport_rect_;
134 gfx::Size current_surface_size_; 137 gfx::Size current_surface_size_;
135 138
136 private: 139 private:
137 gfx::Vector2d enlarge_pass_texture_amount_; 140 gfx::Vector2d enlarge_pass_texture_amount_;
138 141
139 internal::NamespaceToken on_demand_task_namespace_; 142 internal::NamespaceToken on_demand_task_namespace_;
140 143
141 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); 144 DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
142 }; 145 };
143 146
144 } // namespace cc 147 } // namespace cc
145 148
146 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ 149 #endif // CC_OUTPUT_DIRECT_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/direct_renderer.cc » ('j') | cc/output/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698