Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / gpu / SkGr.cpp
index db46b86..2596e96 100644 (file)
@@ -43,7 +43,7 @@ static void build_compressed_data(void* buffer, const SkBitmap& bitmap) {
     dstPI.fRowBytes = count * sizeof(SkPMColor);
 
     SkSrcPixelInfo srcPI;
-    srcPI.fColorType = kPMColor_SkColorType;
+    srcPI.fColorType = kN32_SkColorType;
     srcPI.fAlphaType = kPremul_SkAlphaType;
     srcPI.fPixels = ctable->lockColors();
     srcPI.fRowBytes = count * sizeof(SkPMColor);
@@ -97,7 +97,7 @@ static void generate_bitmap_texture_desc(const SkBitmap& bitmap, GrTextureDesc*
     desc->fFlags = kNone_GrTextureFlags;
     desc->fWidth = bitmap.width();
     desc->fHeight = bitmap.height();
-    desc->fConfig = SkBitmapConfig2GrPixelConfig(bitmap.config());
+    desc->fConfig = SkImageInfo2GrPixelConfig(bitmap.info());
     desc->fSampleCnt = 0;
 }
 
@@ -166,10 +166,10 @@ static GrTexture* sk_gr_create_bitmap_texture(GrContext* ctx,
                 return result;
             }
         } else {
-            origBitmap.copyTo(&tmpBitmap, kPMColor_SkColorType);
+            origBitmap.copyTo(&tmpBitmap, kN32_SkColorType);
             // now bitmap points to our temp, which has been promoted to 32bits
             bitmap = &tmpBitmap;
-            desc.fConfig = SkBitmapConfig2GrPixelConfig(bitmap->config());
+            desc.fConfig = SkImageInfo2GrPixelConfig(bitmap->info());
         }
     }