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

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 227433009: Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 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
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/SkGr.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 2011 Google Inc. 2 * Copyright 2011 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 "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "effects/GrBicubicEffect.h" 10 #include "effects/GrBicubicEffect.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 origInfo.width() < 0 || origInfo.height() < 0) { 222 origInfo.width() < 0 || origInfo.height() < 0) {
223 return NULL; 223 return NULL;
224 } 224 }
225 225
226 SkImageInfo info = origInfo; 226 SkImageInfo info = origInfo;
227 // TODO: perhas we can loosen this check now that colortype is more detailed 227 // TODO: perhas we can loosen this check now that colortype is more detailed
228 // e.g. can we support both RGBA and BGRA here? 228 // e.g. can we support both RGBA and BGRA here?
229 if (kRGB_565_SkColorType == info.colorType()) { 229 if (kRGB_565_SkColorType == info.colorType()) {
230 info.fAlphaType = kOpaque_SkAlphaType; // force this setting 230 info.fAlphaType = kOpaque_SkAlphaType; // force this setting
231 } else { 231 } else {
232 info.fColorType = kPMColor_SkColorType; 232 info.fColorType = kN32_SkColorType;
233 if (kOpaque_SkAlphaType != info.alphaType()) { 233 if (kOpaque_SkAlphaType != info.alphaType()) {
234 info.fAlphaType = kPremul_SkAlphaType; // force this setting 234 info.fAlphaType = kPremul_SkAlphaType; // force this setting
235 } 235 }
236 } 236 }
237 237
238 GrTextureDesc desc; 238 GrTextureDesc desc;
239 desc.fFlags = kRenderTarget_GrTextureFlagBit; 239 desc.fFlags = kRenderTarget_GrTextureFlagBit;
240 desc.fWidth = info.width(); 240 desc.fWidth = info.width();
241 desc.fHeight = info.height(); 241 desc.fHeight = info.height();
242 desc.fConfig = SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType()) ; 242 desc.fConfig = SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType()) ;
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 const GrAtlasedLayer* layer = fContext->getLayerCache()->findLayerOr Create(picture, i); 1973 const GrAtlasedLayer* layer = fContext->getLayerCache()->findLayerOr Create(picture, i);
1974 1974
1975 SkDebugf("%d (%d), ", i, layer->layerID()); 1975 SkDebugf("%d (%d), ", i, layer->layerID());
1976 } 1976 }
1977 } 1977 }
1978 SkDebugf("\n"); 1978 SkDebugf("\n");
1979 #endif 1979 #endif
1980 1980
1981 return false; 1981 return false;
1982 } 1982 }
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698