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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 paint.setDisableOutputConversionToSRGB(true); | 140 paint.setDisableOutputConversionToSRGB(true); |
141 } else { | 141 } else { |
142 paint.addColorFragmentProcessor(GrGammaEffect::Create(2.2f))->unref(
); | 142 paint.addColorFragmentProcessor(GrGammaEffect::Create(2.2f))->unref(
); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); | 146 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); |
147 const SkRect r = SkRect::MakeIWH(yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY]
.fWidth, | 147 const SkRect r = SkRect::MakeIWH(yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY]
.fWidth, |
148 yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY].fHeight); | 148 yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY].fHeight); |
149 | 149 |
150 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), r); | 150 drawContext->drawRect(GrNoClip(), paint, SkMatrix::I(), r); |
151 | 151 |
152 return drawContext->asTexture(); | 152 return drawContext->asTexture(); |
153 } | 153 } |
OLD | NEW |