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

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

Issue 132163009: [#6]Pass gfx structs by const ref (gfx::Vector2d) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on TOT Created 6 years, 10 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/direct_renderer.h ('k') | cc/output/software_output_device.h » ('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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 ResourceProvider* resource_provider) 132 ResourceProvider* resource_provider)
133 : Renderer(client, settings), 133 : Renderer(client, settings),
134 output_surface_(output_surface), 134 output_surface_(output_surface),
135 resource_provider_(resource_provider) {} 135 resource_provider_(resource_provider) {}
136 136
137 DirectRenderer::~DirectRenderer() {} 137 DirectRenderer::~DirectRenderer() {}
138 138
139 bool DirectRenderer::CanReadPixels() const { return true; } 139 bool DirectRenderer::CanReadPixels() const { return true; }
140 140
141 void DirectRenderer::SetEnlargePassTextureAmountForTesting( 141 void DirectRenderer::SetEnlargePassTextureAmountForTesting(
142 gfx::Vector2d amount) { 142 const gfx::Vector2d& amount) {
143 enlarge_pass_texture_amount_ = amount; 143 enlarge_pass_texture_amount_ = amount;
144 } 144 }
145 145
146 void DirectRenderer::DecideRenderPassAllocationsForFrame( 146 void DirectRenderer::DecideRenderPassAllocationsForFrame(
147 const RenderPassList& render_passes_in_draw_order) { 147 const RenderPassList& render_passes_in_draw_order) {
148 if (!resource_provider_) 148 if (!resource_provider_)
149 return; 149 return;
150 150
151 base::hash_map<RenderPass::Id, gfx::Size> render_passes_in_frame; 151 base::hash_map<RenderPass::Id, gfx::Size> render_passes_in_frame;
152 for (size_t i = 0; i < render_passes_in_draw_order.size(); ++i) 152 for (size_t i = 0; i < render_passes_in_draw_order.size(); ++i)
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 ScopedResource* texture = render_pass_textures_.get(id); 421 ScopedResource* texture = render_pass_textures_.get(id);
422 return texture && texture->id(); 422 return texture && texture->id();
423 } 423 }
424 424
425 // static 425 // static
426 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 426 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
427 return render_pass->output_rect.size(); 427 return render_pass->output_rect.size();
428 } 428 }
429 429
430 } // namespace cc 430 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/software_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698