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

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

Issue 234243002: Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/core/SkBlitter_Sprite.cpp ('k') | src/core/SkDraw.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 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2606 case kPremul_SkAlphaType: 2606 case kPremul_SkAlphaType:
2607 case kOpaque_SkAlphaType: 2607 case kOpaque_SkAlphaType:
2608 break; 2608 break;
2609 default: 2609 default:
2610 return false; 2610 return false;
2611 } 2611 }
2612 2612
2613 switch (info.colorType()) { 2613 switch (info.colorType()) {
2614 case kAlpha_8_SkColorType: 2614 case kAlpha_8_SkColorType:
2615 case kRGB_565_SkColorType: 2615 case kRGB_565_SkColorType:
2616 case kN32_SkColorType: 2616 case kPMColor_SkColorType:
2617 break; 2617 break;
2618 default: 2618 default:
2619 return false; 2619 return false;
2620 } 2620 }
2621 2621
2622 return true; 2622 return true;
2623 } 2623 }
2624 2624
2625 SkCanvas* SkCanvas::NewRaster(const SkImageInfo& info) { 2625 SkCanvas* SkCanvas::NewRaster(const SkImageInfo& info) {
2626 if (!supported_for_raster_canvas(info)) { 2626 if (!supported_for_raster_canvas(info)) {
(...skipping 21 matching lines...) Expand all
2648 if (!bitmap.installPixels(info, pixels, rowBytes)) { 2648 if (!bitmap.installPixels(info, pixels, rowBytes)) {
2649 return NULL; 2649 return NULL;
2650 } 2650 }
2651 2651
2652 // should this functionality be moved into allocPixels()? 2652 // should this functionality be moved into allocPixels()?
2653 if (!bitmap.info().isOpaque()) { 2653 if (!bitmap.info().isOpaque()) {
2654 bitmap.eraseColor(0); 2654 bitmap.eraseColor(0);
2655 } 2655 }
2656 return SkNEW_ARGS(SkCanvas, (bitmap)); 2656 return SkNEW_ARGS(SkCanvas, (bitmap));
2657 } 2657 }
OLDNEW
« no previous file with comments | « src/core/SkBlitter_Sprite.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698