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

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

Issue 1734983003: New GM that exercises gamma-correctness in various parts of the pipeline. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Switched to SkString. Better labels for several tests. Added "bitmap wrapped in shader" to demonstr… Created 4 years, 10 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 | « gm/gamma.cpp ('k') | src/core/SkSpriteBlitter.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 2006 The Android Open Source Project 2 * Copyright 2006 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 "SkSmallAllocator.h" 8 #include "SkSmallAllocator.h"
9 #include "SkSpriteBlitter.h" 9 #include "SkSpriteBlitter.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 */ 53 */
54 SkASSERT(allocator != nullptr); 54 SkASSERT(allocator != nullptr);
55 55
56 SkSpriteBlitter* blitter; 56 SkSpriteBlitter* blitter;
57 57
58 switch (dst.colorType()) { 58 switch (dst.colorType()) {
59 case kRGB_565_SkColorType: 59 case kRGB_565_SkColorType:
60 blitter = SkSpriteBlitter::ChooseD16(source, paint, allocator); 60 blitter = SkSpriteBlitter::ChooseD16(source, paint, allocator);
61 break; 61 break;
62 case kN32_SkColorType: 62 case kN32_SkColorType:
63 if (dst.info().isSRGB()) { 63 if (dst.info().isSRGB() || source.info().isSRGB()) {
64 blitter = SkSpriteBlitter::ChooseS32(source, paint, allocator); 64 blitter = SkSpriteBlitter::ChooseNew32(source, paint, allocator,
65 dst.info().profileType()) ;
65 } else { 66 } else {
66 blitter = SkSpriteBlitter::ChooseL32(source, paint, allocator); 67 blitter = SkSpriteBlitter::ChooseLegacy32(source, paint, allocat or);
67 } 68 }
68 break; 69 break;
69 case kRGBA_F16_SkColorType: 70 case kRGBA_F16_SkColorType:
70 blitter = SkSpriteBlitter::ChooseF16(source, paint, allocator); 71 blitter = SkSpriteBlitter::ChooseF16(source, paint, allocator);
71 break; 72 break;
72 default: 73 default:
73 blitter = nullptr; 74 blitter = nullptr;
74 break; 75 break;
75 } 76 }
76 77
77 if (blitter) { 78 if (blitter) {
78 blitter->setup(dst, left, top, paint); 79 blitter->setup(dst, left, top, paint);
79 } 80 }
80 return blitter; 81 return blitter;
81 } 82 }
OLDNEW
« no previous file with comments | « gm/gamma.cpp ('k') | src/core/SkSpriteBlitter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698