Bug 1317430 - Avoid a unnecessary copy by passing a const & in gfx/ r=nical

MozReview-Commit-ID: 4AHG1queVe6

--HG--
extra : rebase_source : cd678e951710321c798b5ca617f39b18f82bea77
This commit is contained in:
Sylvestre Ledru 2016-11-14 23:16:18 +01:00
parent 34c92c780f
commit d6ef1e706d
5 changed files with 5 additions and 5 deletions

View File

@ -375,7 +375,7 @@ SkImageIsMask(const sk_sp<SkImage>& aImage)
}
static bool
ExtractAlphaBitmap(sk_sp<SkImage> aImage, SkBitmap* aResultBitmap)
ExtractAlphaBitmap(const sk_sp<SkImage>& aImage, SkBitmap* aResultBitmap)
{
SkImageInfo info = SkImageInfo::MakeA8(aImage->width(), aImage->height());
SkBitmap bitmap;

View File

@ -59,7 +59,7 @@ SourceSurfaceSkia::InitFromData(unsigned char* aData,
}
bool
SourceSurfaceSkia::InitFromImage(sk_sp<SkImage> aImage,
SourceSurfaceSkia::InitFromImage(const sk_sp<SkImage>& aImage,
SurfaceFormat aFormat,
DrawTargetSkia* aOwner)
{

View File

@ -35,7 +35,7 @@ public:
int32_t aStride,
SurfaceFormat aFormat);
bool InitFromImage(sk_sp<SkImage> aImage,
bool InitFromImage(const sk_sp<SkImage>& aImage,
SurfaceFormat aFormat = SurfaceFormat::UNKNOWN,
DrawTargetSkia* aOwner = nullptr);

View File

@ -214,7 +214,7 @@ PersistentBufferProviderShared::SetForwarder(ShadowLayerForwarder* aFwd)
}
TextureClient*
PersistentBufferProviderShared::GetTexture(Maybe<uint32_t> aIndex)
PersistentBufferProviderShared::GetTexture(const Maybe<uint32_t>& aIndex)
{
if (aIndex.isNothing() || !CheckIndex(aIndex.value())) {
return nullptr;

View File

@ -145,7 +145,7 @@ protected:
~PersistentBufferProviderShared();
TextureClient* GetTexture(Maybe<uint32_t> aIndex);
TextureClient* GetTexture(const Maybe<uint32_t>& aIndex);
bool CheckIndex(uint32_t aIndex) { return aIndex < mTextures.length(); }
void Destroy();