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

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

Issue 12967018: cc: Avoid pointless gfx::Point/Size contructors when making Rects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RectFs as well Created 7 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 | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/gl_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 #include "cc/output/direct_renderer.h" 5 #include "cc/output/direct_renderer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 render_passes_in_draw_order.size()); 182 render_passes_in_draw_order.size());
183 183
184 const RenderPass* root_render_pass = render_passes_in_draw_order.back(); 184 const RenderPass* root_render_pass = render_passes_in_draw_order.back();
185 DCHECK(root_render_pass); 185 DCHECK(root_render_pass);
186 186
187 DrawingFrame frame; 187 DrawingFrame frame;
188 frame.root_render_pass = root_render_pass; 188 frame.root_render_pass = root_render_pass;
189 frame.root_damage_rect = 189 frame.root_damage_rect =
190 Capabilities().using_partial_swap ? 190 Capabilities().using_partial_swap ?
191 root_render_pass->damage_rect : root_render_pass->output_rect; 191 root_render_pass->damage_rect : root_render_pass->output_rect;
192 frame.root_damage_rect.Intersect(gfx::Rect(gfx::Point(), ViewportSize())); 192 frame.root_damage_rect.Intersect(gfx::Rect(ViewportSize()));
193 193
194 BeginDrawingFrame(frame); 194 BeginDrawingFrame(frame);
195 for (size_t i = 0; i < render_passes_in_draw_order.size(); ++i) 195 for (size_t i = 0; i < render_passes_in_draw_order.size(); ++i)
196 DrawRenderPass(frame, render_passes_in_draw_order[i]); 196 DrawRenderPass(frame, render_passes_in_draw_order[i]);
197 FinishDrawingFrame(frame); 197 FinishDrawingFrame(frame);
198 198
199 render_passes_in_draw_order.clear(); 199 render_passes_in_draw_order.clear();
200 } 200 }
201 201
202 gfx::RectF DirectRenderer::ComputeScissorRectForRenderPass( 202 gfx::RectF DirectRenderer::ComputeScissorRectForRenderPass(
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 336 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
337 return render_pass->output_rect.size(); 337 return render_pass->output_rect.size();
338 } 338 }
339 339
340 // static 340 // static
341 GLenum DirectRenderer::RenderPassTextureFormat(const RenderPass* render_pass) { 341 GLenum DirectRenderer::RenderPassTextureFormat(const RenderPass* render_pass) {
342 return GL_RGBA; 342 return GL_RGBA;
343 } 343 }
344 344
345 } // namespace cc 345 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698