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

Side by Side Diff: cc/resources/resource_update.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/resources/resource_update.h ('k') | cc/test/fake_layer_tree_host_client.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/resources/resource_update.h" 5 #include "cc/resources/resource_update.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 ResourceUpdate ResourceUpdate::Create(PrioritizedResource* resource, 11 ResourceUpdate ResourceUpdate::Create(PrioritizedResource* resource,
12 const SkBitmap* bitmap, 12 const SkBitmap* bitmap,
13 const gfx::Rect& content_rect, 13 const gfx::Rect& content_rect,
14 const gfx::Rect& source_rect, 14 const gfx::Rect& source_rect,
15 gfx::Vector2d dest_offset) { 15 const gfx::Vector2d& dest_offset) {
16 CHECK(content_rect.Contains(source_rect)); 16 CHECK(content_rect.Contains(source_rect));
17 ResourceUpdate update; 17 ResourceUpdate update;
18 update.texture = resource; 18 update.texture = resource;
19 update.bitmap = bitmap; 19 update.bitmap = bitmap;
20 update.content_rect = content_rect; 20 update.content_rect = content_rect;
21 update.source_rect = source_rect; 21 update.source_rect = source_rect;
22 update.dest_offset = dest_offset; 22 update.dest_offset = dest_offset;
23 return update; 23 return update;
24 } 24 }
25 25
26 ResourceUpdate::ResourceUpdate() 26 ResourceUpdate::ResourceUpdate()
27 : texture(NULL), 27 : texture(NULL),
28 bitmap(NULL) {} 28 bitmap(NULL) {}
29 29
30 ResourceUpdate::~ResourceUpdate() {} 30 ResourceUpdate::~ResourceUpdate() {}
31 31
32 } // namespace cc 32 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_update.h ('k') | cc/test/fake_layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698