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

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

Issue 1178383003: Revert of Make GrTextContext be owned by the GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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/gpu/SkGpuDevice.cpp ('k') | no next file » | 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 "SkImage_Gpu.h" 8 #include "SkImage_Gpu.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 return NULL; 221 return NULL;
222 } 222 }
223 223
224 GrPaint paint; 224 GrPaint paint;
225 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); 225 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
226 paint.addColorProcessor(GrYUVtoRGBEffect::Create(yTex, uTex, vTex, yuvSizes, 226 paint.addColorProcessor(GrYUVtoRGBEffect::Create(yTex, uTex, vTex, yuvSizes,
227 colorSpace))->unref(); 227 colorSpace))->unref();
228 228
229 const SkRect rect = SkRect::MakeWH(SkIntToScalar(dstDesc.fWidth), 229 const SkRect rect = SkRect::MakeWH(SkIntToScalar(dstDesc.fWidth),
230 SkIntToScalar(dstDesc.fHeight)); 230 SkIntToScalar(dstDesc.fHeight));
231 GrDrawContext* drawContext = ctx->drawContext(); 231 ctx->drawContext()->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), pain t, SkMatrix::I(),
232 drawContext->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, SkMa trix::I(), rect); 232 rect);
233 ctx->flushSurfaceWrites(dst); 233 ctx->flushSurfaceWrites(dst);
234 return SkNEW_ARGS(SkImage_Gpu, (dstDesc.fWidth, dstDesc.fHeight, kOpaque_SkA lphaType, dst, 0, 234 return SkNEW_ARGS(SkImage_Gpu, (dstDesc.fWidth, dstDesc.fHeight, kOpaque_SkA lphaType, dst, 0,
235 budgeted)); 235 budgeted));
236 } 236 }
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698