| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 const SkRect r = SkRect::MakeIWH(yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY]
.fWidth, | 134 const SkRect r = SkRect::MakeIWH(yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY]
.fWidth, |
| 135 yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY].fHeight); | 135 yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY].fHeight); |
| 136 | 136 |
| 137 SkAutoTUnref<GrDrawContext> drawContext(ctx->drawContext(renderTarget)); | 137 SkAutoTUnref<GrDrawContext> drawContext(ctx->drawContext(renderTarget)); |
| 138 if (!drawContext) { | 138 if (!drawContext) { |
| 139 return nullptr; | 139 return nullptr; |
| 140 } | 140 } |
| 141 | 141 |
| 142 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), r); | 142 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), r); |
| 143 | 143 |
| 144 return result.detach(); | 144 return result.release(); |
| 145 } | 145 } |
| 146 | 146 |
| OLD | NEW |