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

Side by Side Diff: src/core/SkMipMap.cpp

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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/core/SkDraw.cpp ('k') | src/core/SkOrderedWriteBuffer.cpp » ('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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 "SkMipMap.h" 8 #include "SkMipMap.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 size.add(SkToS32(pixelSize)); 122 size.add(SkToS32(pixelSize));
123 if (!isPos32Bits(size)) { 123 if (!isPos32Bits(size)) {
124 return NULL; 124 return NULL;
125 } 125 }
126 return (Level*)sk_malloc_throw(size.get32()); 126 return (Level*)sk_malloc_throw(size.get32());
127 } 127 }
128 128
129 SkMipMap* SkMipMap::Build(const SkBitmap& src) { 129 SkMipMap* SkMipMap::Build(const SkBitmap& src) {
130 void (*proc)(SkBitmap* dst, int x, int y, const SkBitmap& src); 130 void (*proc)(SkBitmap* dst, int x, int y, const SkBitmap& src);
131 131
132 const SkBitmap::Config config = src.getConfig(); 132 const SkBitmap::Config config = src.config();
133 switch (config) { 133 switch (config) {
134 case SkBitmap::kARGB_8888_Config: 134 case SkBitmap::kARGB_8888_Config:
135 proc = downsampleby2_proc32; 135 proc = downsampleby2_proc32;
136 break; 136 break;
137 case SkBitmap::kRGB_565_Config: 137 case SkBitmap::kRGB_565_Config:
138 proc = downsampleby2_proc16; 138 proc = downsampleby2_proc16;
139 break; 139 break;
140 case SkBitmap::kARGB_4444_Config: 140 case SkBitmap::kARGB_4444_Config:
141 proc = downsampleby2_proc4444; 141 proc = downsampleby2_proc4444;
142 break; 142 break;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 253 }
254 254
255 if (level > fCount) { 255 if (level > fCount) {
256 level = fCount; 256 level = fCount;
257 } 257 }
258 if (levelPtr) { 258 if (levelPtr) {
259 *levelPtr = fLevels[level - 1]; 259 *levelPtr = fLevels[level - 1];
260 } 260 }
261 return true; 261 return true;
262 } 262 }
OLDNEW
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkOrderedWriteBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698