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

Side by Side Diff: src/image/SkSurface_Raster.cpp

Issue 1697863002: blitters for sRGB and float16 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/core/SkShader.cpp ('k') | src/views/SkWindow.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 2012 Google Inc. 2 * Copyright 2012 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 "SkSurface_Base.h" 8 #include "SkSurface_Base.h"
9 #include "SkImagePriv.h" 9 #include "SkImagePriv.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 switch (info.colorType()) { 50 switch (info.colorType()) {
51 case kAlpha_8_SkColorType: 51 case kAlpha_8_SkColorType:
52 shift = 0; 52 shift = 0;
53 break; 53 break;
54 case kRGB_565_SkColorType: 54 case kRGB_565_SkColorType:
55 shift = 1; 55 shift = 1;
56 break; 56 break;
57 case kN32_SkColorType: 57 case kN32_SkColorType:
58 shift = 2; 58 shift = 2;
59 break; 59 break;
60 case kRGBA_F16_SkColorType:
61 shift = 3;
62 break;
60 default: 63 default:
61 return false; 64 return false;
62 } 65 }
63 66
64 if (kIgnoreRowBytesValue == rowBytes) { 67 if (kIgnoreRowBytesValue == rowBytes) {
65 return true; 68 return true;
66 } 69 }
67 70
68 uint64_t minRB = (uint64_t)info.width() << shift; 71 uint64_t minRB = (uint64_t)info.width() << shift;
69 if (minRB > rowBytes) { 72 if (minRB > rowBytes) {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 199 }
197 if (rowBytes) { 200 if (rowBytes) {
198 SkASSERT(pr->rowBytes() == rowBytes); 201 SkASSERT(pr->rowBytes() == rowBytes);
199 } 202 }
200 return new SkSurface_Raster(pr, props); 203 return new SkSurface_Raster(pr, props);
201 } 204 }
202 205
203 SkSurface* SkSurface::NewRaster(const SkImageInfo& info, const SkSurfaceProps* p rops) { 206 SkSurface* SkSurface::NewRaster(const SkImageInfo& info, const SkSurfaceProps* p rops) {
204 return NewRaster(info, 0, props); 207 return NewRaster(info, 0, props);
205 } 208 }
OLDNEW
« no previous file with comments | « src/core/SkShader.cpp ('k') | src/views/SkWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698