Chromium Code Reviews| Index: src/gpu/GrImageIDTextureAdjuster.cpp |
| diff --git a/src/gpu/GrImageIDTextureAdjuster.cpp b/src/gpu/GrImageIDTextureAdjuster.cpp |
| index 4b57757da60f27a719a5336861a9fbad8fc48aaf..989102e740f2811dd428ffc30449cd9b3432206d 100644 |
| --- a/src/gpu/GrImageIDTextureAdjuster.cpp |
| +++ b/src/gpu/GrImageIDTextureAdjuster.cpp |
| @@ -17,36 +17,6 @@ |
| static bool bmp_is_alpha_only(const SkBitmap& bm) { return kAlpha_8_SkColorType == bm.colorType(); } |
| -GrBitmapTextureAdjuster::GrBitmapTextureAdjuster(const SkBitmap* bmp) |
| - : INHERITED(bmp->getTexture(), |
| - SkIRect::MakeWH(bmp->width(), bmp->height()), |
| - bmp_is_alpha_only(*bmp)) |
| - , fBmp(bmp) {} |
| - |
| -void GrBitmapTextureAdjuster::makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) { |
| - if (fBmp->isVolatile()) { |
| - return; |
| - } |
| - // The content area must represent the whole bitmap. Texture-backed bitmaps don't support |
| - // extractSubset(). Therefore, either the bitmap and the texture are the same size or the |
| - // content's dimensions are the bitmap's dimensions which is pinned to the upper left |
| - // of the texture. |
| - GrUniqueKey baseKey; |
| - GrMakeKeyFromImageID(&baseKey, fBmp->getGenerationID(), |
| - SkIRect::MakeWH(fBmp->width(), fBmp->height())); |
| - MakeCopyKeyFromOrigKey(baseKey, params, copyKey); |
| -} |
| - |
| -void GrBitmapTextureAdjuster::didCacheCopy(const GrUniqueKey& copyKey) { |
| - GrInstallBitmapUniqueKeyInvalidator(copyKey, fBmp->pixelRef()); |
| -} |
| - |
| -SkColorSpace* GrBitmapTextureAdjuster::getColorSpace() { |
| - return fBmp->colorSpace(); |
| -} |
| - |
| -////////////////////////////////////////////////////////////////////////////// |
| - |
| // SkImage's don't have a way of communicating whether they're alpha-only. So we fallback to |
| // inspecting the texture. |
| static bool tex_image_is_alpha_only(const SkImage_Base& img) { |
| @@ -79,8 +49,8 @@ SkColorSpace* GrImageTextureAdjuster::getColorSpace() { |
| GrBitmapTextureMaker::GrBitmapTextureMaker(GrContext* context, const SkBitmap& bitmap) |
| : INHERITED(context, bitmap.width(), bitmap.height(), bmp_is_alpha_only(bitmap)) |
| - , fBitmap(bitmap) { |
| - SkASSERT(!bitmap.getTexture()); |
| + , fBitmap(bitmap) |
| +{ |
|
bsalomon
2016/07/22 18:06:49
{ on prev line?
reed1
2016/07/22 21:46:35
I see and use this left-align { when there are mul
|
| if (!bitmap.isVolatile()) { |
| SkIPoint origin = bitmap.pixelRefOrigin(); |
| SkIRect subset = SkIRect::MakeXYWH(origin.fX, origin.fY, bitmap.width(), |