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

Side by Side Diff: src/ports/SkImageDecoder_CG.cpp

Issue 302053002: Revert of setConfig -> setInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/utils/SkGatherPixelRefsAndRects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCGUtils.h" 8 #include "SkCGUtils.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkImageDecoder.h" 10 #include "SkImageDecoder.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 CGImageRef image = CGImageSourceCreateImageAtIndex(imageSrc, 0, NULL); 63 CGImageRef image = CGImageSourceCreateImageAtIndex(imageSrc, 0, NULL);
64 if (NULL == image) { 64 if (NULL == image) {
65 return false; 65 return false;
66 } 66 }
67 SkAutoTCallVProc<CGImage, CGImageRelease> arimage(image); 67 SkAutoTCallVProc<CGImage, CGImageRelease> arimage(image);
68 68
69 const int width = SkToInt(CGImageGetWidth(image)); 69 const int width = SkToInt(CGImageGetWidth(image));
70 const int height = SkToInt(CGImageGetHeight(image)); 70 const int height = SkToInt(CGImageGetHeight(image));
71 SkImageInfo skinfo = SkImageInfo::MakeN32Premul(width, height); 71 SkImageInfo skinfo = SkImageInfo::MakeN32Premul(width, height);
72 72
73 bm->setInfo(skinfo); 73 bm->setConfig(skinfo);
74 if (SkImageDecoder::kDecodeBounds_Mode == mode) { 74 if (SkImageDecoder::kDecodeBounds_Mode == mode) {
75 return true; 75 return true;
76 } 76 }
77 77
78 if (!this->allocPixelRef(bm, NULL)) { 78 if (!this->allocPixelRef(bm, NULL)) {
79 return false; 79 return false;
80 } 80 }
81 81
82 SkAutoLockPixels alp(*bm); 82 SkAutoLockPixels alp(*bm);
83 83
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 SkAutoTCallVProc<const void, CFRelease> arsrc(imageSrc); 284 SkAutoTCallVProc<const void, CFRelease> arsrc(imageSrc);
285 const CFStringRef name = CGImageSourceGetType(imageSrc); 285 const CFStringRef name = CGImageSourceGetType(imageSrc);
286 if (NULL == name) { 286 if (NULL == name) {
287 return SkImageDecoder::kUnknown_Format; 287 return SkImageDecoder::kUnknown_Format;
288 } 288 }
289 return UTType_to_Format(name); 289 return UTType_to_Format(name);
290 } 290 }
291 291
292 static SkImageDecoder_FormatReg gFormatReg(get_format_cg); 292 static SkImageDecoder_FormatReg gFormatReg(get_format_cg);
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/utils/SkGatherPixelRefsAndRects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698