| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrContext.h" | 8 #include "GrContext.h" |
| 9 #include "GrDrawContext.h" | 9 #include "GrDrawContext.h" |
| 10 #include "GrYUVProvider.h" | 10 #include "GrYUVProvider.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 GrYUVEffect::CreateYUVToRGB(yuvTextures[
0], | 130 GrYUVEffect::CreateYUVToRGB(yuvTextures[
0], |
| 131 yuvTextures[
1], | 131 yuvTextures[
1], |
| 132 yuvTextures[
2], | 132 yuvTextures[
2], |
| 133 yuvInfo.fSiz
eInfo.fSizes, | 133 yuvInfo.fSiz
eInfo.fSizes, |
| 134 yuvInfo.fCol
orSpace)); | 134 yuvInfo.fCol
orSpace)); |
| 135 paint.addColorFragmentProcessor(yuvToRgbProcessor); | 135 paint.addColorFragmentProcessor(yuvToRgbProcessor); |
| 136 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); | 136 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); |
| 137 const SkRect r = SkRect::MakeIWH(yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY]
.fWidth, | 137 const SkRect r = SkRect::MakeIWH(yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY]
.fWidth, |
| 138 yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY].fHeight); | 138 yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY].fHeight); |
| 139 | 139 |
| 140 SkAutoTUnref<GrDrawContext> drawContext(ctx->drawContext(renderTarget)); | 140 sk_sp<GrDrawContext> drawContext(ctx->drawContext(sk_ref_sp(renderTarget))); |
| 141 if (!drawContext) { | 141 if (!drawContext) { |
| 142 return nullptr; | 142 return nullptr; |
| 143 } | 143 } |
| 144 | 144 |
| 145 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), r); | 145 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), r); |
| 146 | 146 |
| 147 return result.release(); | 147 return result.release(); |
| 148 } | 148 } |
| OLD | NEW |