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

Unified Diff: cc/resources/resource_provider.h

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/resource_pool.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index 836eae3374edeace6928305b1444f63fcde5aa28..c53cf8f4dbc8209e7e4822619f67b003a40d7672 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -97,28 +97,28 @@ class CC_EXPORT ResourceProvider {
ResourceType GetResourceType(ResourceId id);
// Creates a resource of the default resource type.
- ResourceId CreateResource(gfx::Size size,
+ ResourceId CreateResource(const gfx::Size& size,
GLint wrap_mode,
TextureUsageHint hint,
ResourceFormat format);
// Creates a resource which is tagged as being managed for GPU memory
// accounting purposes.
- ResourceId CreateManagedResource(gfx::Size size,
+ ResourceId CreateManagedResource(const gfx::Size& size,
GLenum target,
GLint wrap_mode,
TextureUsageHint hint,
ResourceFormat format);
// You can also explicitly create a specific resource type.
- ResourceId CreateGLTexture(gfx::Size size,
+ ResourceId CreateGLTexture(const gfx::Size& size,
GLenum target,
GLenum texture_pool,
GLint wrap_mode,
TextureUsageHint hint,
ResourceFormat format);
- ResourceId CreateBitmap(gfx::Size size, GLint wrap_mode);
+ ResourceId CreateBitmap(const gfx::Size& size, GLint wrap_mode);
// Wraps an external texture into a GL resource.
ResourceId CreateResourceFromExternalTexture(
unsigned texture_target,
@@ -366,7 +366,7 @@ class CC_EXPORT ResourceProvider {
Resource();
~Resource();
Resource(unsigned texture_id,
- gfx::Size size,
+ const gfx::Size& size,
GLenum target,
GLenum filter,
GLenum texture_pool,
@@ -375,7 +375,7 @@ class CC_EXPORT ResourceProvider {
ResourceFormat format);
Resource(uint8_t* pixels,
SharedBitmap* bitmap,
- gfx::Size size,
+ const gfx::Size& size,
GLenum filter,
GLint wrap_mode);
« no previous file with comments | « cc/resources/resource_pool.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698