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

Unified Diff: cc/output/renderer_pixeltest.cc

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/renderer.h ('k') | cc/output/software_output_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/renderer_pixeltest.cc
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
index 8ab93aab30ab7394068ea698839ee26a18037116..68bd8555d03a787205071fb869c78d7715eaa51a 100644
--- a/cc/output/renderer_pixeltest.cc
+++ b/cc/output/renderer_pixeltest.cc
@@ -25,7 +25,7 @@ namespace {
#if !defined(OS_ANDROID)
scoped_ptr<RenderPass> CreateTestRootRenderPass(RenderPass::Id id,
- gfx::Rect rect) {
+ const gfx::Rect& rect) {
scoped_ptr<RenderPass> pass = RenderPass::Create();
const gfx::Rect output_rect = rect;
const gfx::RectF damage_rect = rect;
@@ -36,7 +36,7 @@ scoped_ptr<RenderPass> CreateTestRootRenderPass(RenderPass::Id id,
scoped_ptr<RenderPass> CreateTestRenderPass(
RenderPass::Id id,
- gfx::Rect rect,
+ const gfx::Rect& rect,
const gfx::Transform& transform_to_root_target) {
scoped_ptr<RenderPass> pass = RenderPass::Create();
const gfx::Rect output_rect = rect;
@@ -46,7 +46,7 @@ scoped_ptr<RenderPass> CreateTestRenderPass(
}
scoped_ptr<SharedQuadState> CreateTestSharedQuadState(
- gfx::Transform content_to_target_transform, gfx::Rect rect) {
+ gfx::Transform content_to_target_transform, const gfx::Rect& rect) {
const gfx::Size content_bounds = rect.size();
const gfx::Rect visible_content_rect = rect;
const gfx::Rect clip_rect = rect;
@@ -66,8 +66,8 @@ scoped_ptr<SharedQuadState> CreateTestSharedQuadState(
scoped_ptr<SharedQuadState> CreateTestSharedQuadStateClipped(
gfx::Transform content_to_target_transform,
- gfx::Rect rect,
- gfx::Rect clip_rect) {
+ const gfx::Rect& rect,
+ const gfx::Rect& clip_rect) {
const gfx::Size content_bounds = rect.size();
const gfx::Rect visible_content_rect = clip_rect;
const bool is_clipped = true;
@@ -85,7 +85,9 @@ scoped_ptr<SharedQuadState> CreateTestSharedQuadStateClipped(
}
scoped_ptr<DrawQuad> CreateTestRenderPassDrawQuad(
- SharedQuadState* shared_state, gfx::Rect rect, RenderPass::Id pass_id) {
+ SharedQuadState* shared_state,
+ const gfx::Rect& rect,
+ RenderPass::Id pass_id) {
scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create();
quad->SetNew(shared_state,
rect,
@@ -101,7 +103,7 @@ scoped_ptr<DrawQuad> CreateTestRenderPassDrawQuad(
}
scoped_ptr<TextureDrawQuad> CreateTestTextureDrawQuad(
- gfx::Rect rect,
+ const gfx::Rect& rect,
SkColor texel_color,
SkColor background_color,
bool premultiplied_alpha,
« no previous file with comments | « cc/output/renderer.h ('k') | cc/output/software_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698