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 1035863002: Remove SetDrawViewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetupViewport > SetViewport Created 5 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
« no previous file with comments | « no previous file | 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 DrawingFrame* frame, 108 DrawingFrame* frame,
109 const gfx::Rect& render_pass_scissor, 109 const gfx::Rect& render_pass_scissor,
110 bool use_render_pass_scissor); 110 bool use_render_pass_scissor);
111 void DrawRenderPass(DrawingFrame* frame, const RenderPass* render_pass); 111 void DrawRenderPass(DrawingFrame* frame, const RenderPass* render_pass);
112 bool UseRenderPass(DrawingFrame* frame, const RenderPass* render_pass); 112 bool UseRenderPass(DrawingFrame* frame, const RenderPass* render_pass);
113 113
114 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; 114 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0;
115 virtual bool BindFramebufferToTexture(DrawingFrame* frame, 115 virtual bool BindFramebufferToTexture(DrawingFrame* frame,
116 const ScopedResource* resource, 116 const ScopedResource* resource,
117 const gfx::Rect& target_rect) = 0; 117 const gfx::Rect& target_rect) = 0;
118 virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) = 0;
119 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; 118 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0;
120 virtual void PrepareSurfaceForPass( 119 virtual void PrepareSurfaceForPass(
121 DrawingFrame* frame, 120 DrawingFrame* frame,
122 SurfaceInitializationMode initialization_mode, 121 SurfaceInitializationMode initialization_mode,
123 const gfx::Rect& render_pass_scissor) = 0; 122 const gfx::Rect& render_pass_scissor) = 0;
124 // clip_region is a (possibly null) pointer to a quad in the same 123 // clip_region is a (possibly null) pointer to a quad in the same
125 // space as the quad. When non-null only the area of the quad that overlaps 124 // space as the quad. When non-null only the area of the quad that overlaps
126 // with clip_region will be drawn. 125 // with clip_region will be drawn.
127 virtual void DoDrawQuad(DrawingFrame* frame, 126 virtual void DoDrawQuad(DrawingFrame* frame,
128 const DrawQuad* quad, 127 const DrawQuad* quad,
(...skipping 10 matching lines...) Expand all
139 virtual void CopyCurrentRenderPassToBitmap( 138 virtual void CopyCurrentRenderPassToBitmap(
140 DrawingFrame* frame, 139 DrawingFrame* frame,
141 scoped_ptr<CopyOutputRequest> request) = 0; 140 scoped_ptr<CopyOutputRequest> request) = 0;
142 141
143 base::ScopedPtrHashMap<RenderPassId, ScopedResource> render_pass_textures_; 142 base::ScopedPtrHashMap<RenderPassId, ScopedResource> render_pass_textures_;
144 OutputSurface* output_surface_; 143 OutputSurface* output_surface_;
145 ResourceProvider* resource_provider_; 144 ResourceProvider* resource_provider_;
146 scoped_ptr<OverlayProcessor> overlay_processor_; 145 scoped_ptr<OverlayProcessor> overlay_processor_;
147 146
148 // For use in coordinate conversion, this stores the output rect, viewport 147 // For use in coordinate conversion, this stores the output rect, viewport
149 // rect (= unflipped version of glViewport rect), and the size of target 148 // rect (= unflipped version of glViewport rect), the size of target
150 // framebuffer. During a draw, this stores the values for the current render 149 // framebuffer, and the current window space viewport. During a draw, this
151 // pass; in between draws, they retain the values for the root render pass of 150 // stores the values for the current render pass; in between draws, they
152 // the last draw. 151 // retain the values for the root render pass of the last draw.
153 gfx::Rect current_draw_rect_; 152 gfx::Rect current_draw_rect_;
154 gfx::Rect current_viewport_rect_; 153 gfx::Rect current_viewport_rect_;
155 gfx::Size current_surface_size_; 154 gfx::Size current_surface_size_;
155 gfx::Rect current_window_space_viewport_;
156 156
157 private: 157 private:
158 gfx::Vector2d enlarge_pass_texture_amount_; 158 gfx::Vector2d enlarge_pass_texture_amount_;
159 159
160 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); 160 DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
161 }; 161 };
162 162
163 } // namespace cc 163 } // namespace cc
164 164
165 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ 165 #endif // CC_OUTPUT_DIRECT_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698