| Index: trunk/src/cc/resources/ui_resource_bitmap.cc
|
| ===================================================================
|
| --- trunk/src/cc/resources/ui_resource_bitmap.cc (revision 248975)
|
| +++ trunk/src/cc/resources/ui_resource_bitmap.cc (working copy)
|
| @@ -13,14 +13,14 @@
|
| namespace cc {
|
|
|
| void UIResourceBitmap::Create(const skia::RefPtr<SkPixelRef>& pixel_ref,
|
| - gfx::Size size,
|
| UIResourceFormat format) {
|
| - DCHECK(size.width());
|
| - DCHECK(size.height());
|
| + const SkImageInfo& info = pixel_ref->info();
|
| + DCHECK(info.fWidth);
|
| + DCHECK(info.fHeight);
|
| DCHECK(pixel_ref);
|
| DCHECK(pixel_ref->isImmutable());
|
| format_ = format;
|
| - size_ = size;
|
| + size_ = gfx::Size(info.fWidth, info.fHeight);
|
| pixel_ref_ = pixel_ref;
|
|
|
| // Default values for secondary parameters.
|
| @@ -34,16 +34,13 @@
|
| DCHECK(skbitmap.isImmutable());
|
|
|
| skia::RefPtr<SkPixelRef> pixel_ref = skia::SharePtr(skbitmap.pixelRef());
|
| - const SkImageInfo& info = pixel_ref->info();
|
| - Create(
|
| - pixel_ref, gfx::Size(info.fWidth, info.fHeight), UIResourceBitmap::RGBA8);
|
| + Create(pixel_ref, UIResourceBitmap::RGBA8);
|
|
|
| SetOpaque(skbitmap.isOpaque());
|
| }
|
|
|
| -UIResourceBitmap::UIResourceBitmap(const skia::RefPtr<SkPixelRef>& pixel_ref,
|
| - gfx::Size size) {
|
| - Create(pixel_ref, size, UIResourceBitmap::ETC1);
|
| +UIResourceBitmap::UIResourceBitmap(const skia::RefPtr<SkPixelRef>& pixel_ref) {
|
| + Create(pixel_ref, UIResourceBitmap::ETC1);
|
| }
|
|
|
| UIResourceBitmap::~UIResourceBitmap() {}
|
|
|