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

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

Issue 232773007: Reland 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 2602 matching lines...) Expand 10 before | Expand all | Expand 10 after
2613 case kPremul_SkAlphaType: 2613 case kPremul_SkAlphaType:
2614 case kOpaque_SkAlphaType: 2614 case kOpaque_SkAlphaType:
2615 break; 2615 break;
2616 default: 2616 default:
2617 return false; 2617 return false;
2618 } 2618 }
2619 2619
2620 switch (info.colorType()) { 2620 switch (info.colorType()) {
2621 case kAlpha_8_SkColorType: 2621 case kAlpha_8_SkColorType:
2622 case kRGB_565_SkColorType: 2622 case kRGB_565_SkColorType:
2623 case kPMColor_SkColorType: 2623 case kN32_SkColorType:
2624 break; 2624 break;
2625 default: 2625 default:
2626 return false; 2626 return false;
2627 } 2627 }
2628 2628
2629 return true; 2629 return true;
2630 } 2630 }
2631 2631
2632 SkCanvas* SkCanvas::NewRaster(const SkImageInfo& info) { 2632 SkCanvas* SkCanvas::NewRaster(const SkImageInfo& info) {
2633 if (!supported_for_raster_canvas(info)) { 2633 if (!supported_for_raster_canvas(info)) {
(...skipping 21 matching lines...) Expand all
2655 if (!bitmap.installPixels(info, pixels, rowBytes)) { 2655 if (!bitmap.installPixels(info, pixels, rowBytes)) {
2656 return NULL; 2656 return NULL;
2657 } 2657 }
2658 2658
2659 // should this functionality be moved into allocPixels()? 2659 // should this functionality be moved into allocPixels()?
2660 if (!bitmap.info().isOpaque()) { 2660 if (!bitmap.info().isOpaque()) {
2661 bitmap.eraseColor(0); 2661 bitmap.eraseColor(0);
2662 } 2662 }
2663 return SkNEW_ARGS(SkCanvas, (bitmap)); 2663 return SkNEW_ARGS(SkCanvas, (bitmap));
2664 } 2664 }
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