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

Unified Diff: cc/resources/prioritized_resource.cc

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/resources/prioritized_resource.h ('k') | cc/resources/prioritized_resource_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/prioritized_resource.cc
diff --git a/cc/resources/prioritized_resource.cc b/cc/resources/prioritized_resource.cc
index 25415f58bf06fef17c193622fb574785b2a5b491..0fc705a8e8a01da086afdb3b23035aa0bc15ef2e 100644
--- a/cc/resources/prioritized_resource.cc
+++ b/cc/resources/prioritized_resource.cc
@@ -14,7 +14,7 @@
namespace cc {
PrioritizedResource::PrioritizedResource(PrioritizedResourceManager* manager,
- gfx::Size size,
+ const gfx::Size& size,
ResourceFormat format)
: size_(size),
format_(format),
@@ -45,7 +45,8 @@ void PrioritizedResource::SetTextureManager(
manager->RegisterTexture(this);
}
-void PrioritizedResource::SetDimensions(gfx::Size size, ResourceFormat format) {
+void PrioritizedResource::SetDimensions(const gfx::Size& size,
+ ResourceFormat format) {
if (format_ != format || size_ != size) {
is_above_priority_cutoff_ = false;
format_ = format;
@@ -117,7 +118,7 @@ void PrioritizedResource::SetToSelfManagedMemoryPlaceholder(size_t bytes) {
PrioritizedResource::Backing::Backing(unsigned id,
ResourceProvider* resource_provider,
- gfx::Size size,
+ const gfx::Size& size,
ResourceFormat format)
: Resource(id, size, format),
owner_(NULL),
« no previous file with comments | « cc/resources/prioritized_resource.h ('k') | cc/resources/prioritized_resource_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698