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

Side by Side Diff: src/utils/SkRGBAToYUV.cpp

Issue 1820303002: Revert of switch colorfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/utils/SkLua.cpp ('k') | tests/ColorFilterTest.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 2016 Google Inc. 2 * Copyright 2016 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 "SkRGBAToYUV.h" 8 #include "SkRGBAToYUV.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorMatrixFilterRowMajor255.h" 10 #include "SkColorMatrixFilterRowMajor255.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 SkImageInfo::MakeA8(sizes[i].fWidth, sizes[i].fHeight), planes[i ], rb)); 42 SkImageInfo::MakeA8(sizes[i].fWidth, sizes[i].fHeight), planes[i ], rb));
43 if (!surface) { 43 if (!surface) {
44 return false; 44 return false;
45 } 45 }
46 SkPaint paint; 46 SkPaint paint;
47 paint.setFilterQuality(kLow_SkFilterQuality); 47 paint.setFilterQuality(kLow_SkFilterQuality);
48 paint.setXfermodeMode(SkXfermode::kSrc_Mode); 48 paint.setXfermodeMode(SkXfermode::kSrc_Mode);
49 int rowStartIdx = 5 * i; 49 int rowStartIdx = 5 * i;
50 const SkScalar* row = kYUVColorSpaceInvMatrices[colorSpace] + rowStartId x; 50 const SkScalar* row = kYUVColorSpaceInvMatrices[colorSpace] + rowStartId x;
51 paint.setColorFilter( 51 paint.setColorFilter(
52 SkColorMatrixFilterRowMajor255::MakeSingleChannelOutput(row)); 52 SkColorMatrixFilterRowMajor255::CreateSingleChannelOutput(row))- >unref();
53 surface->getCanvas()->drawImageRect(image, SkIRect::MakeWH(image->width( ), image->height()), 53 surface->getCanvas()->drawImageRect(image, SkIRect::MakeWH(image->width( ), image->height()),
54 SkRect::MakeIWH(surface->width(), su rface->height()), 54 SkRect::MakeIWH(surface->width(), su rface->height()),
55 &paint); 55 &paint);
56 } 56 }
57 return true; 57 return true;
58 } 58 }
OLDNEW
« no previous file with comments | « src/utils/SkLua.cpp ('k') | tests/ColorFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698