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

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

Issue 1388113002: Bye bye processor data manager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove files Created 5 years, 2 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/image/SkImageShader.cpp ('k') | tests/GLProgramsTest.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 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 "SkBitmapCache.h" 8 #include "SkBitmapCache.h"
9 #include "SkImage_Gpu.h" 9 #include "SkImage_Gpu.h"
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 dstDesc.fConfig = kRGBA_8888_GrPixelConfig; 290 dstDesc.fConfig = kRGBA_8888_GrPixelConfig;
291 dstDesc.fSampleCnt = 0; 291 dstDesc.fSampleCnt = 0;
292 292
293 SkAutoTUnref<GrTexture> dst(ctx->textureProvider()->createTexture(dstDesc, t rue)); 293 SkAutoTUnref<GrTexture> dst(ctx->textureProvider()->createTexture(dstDesc, t rue));
294 if (!dst) { 294 if (!dst) {
295 return nullptr; 295 return nullptr;
296 } 296 }
297 297
298 GrPaint paint; 298 GrPaint paint;
299 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); 299 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
300 paint.addColorFragmentProcessor(GrYUVtoRGBEffect::Create(paint.getProcessorD ataManager(), 300 paint.addColorFragmentProcessor(GrYUVtoRGBEffect::Create(yTex, uTex, vTex, y uvSizes,
301 yTex, uTex, vTex, y uvSizes,
302 colorSpace))->unref (); 301 colorSpace))->unref ();
303 302
304 const SkRect rect = SkRect::MakeWH(SkIntToScalar(dstDesc.fWidth), 303 const SkRect rect = SkRect::MakeWH(SkIntToScalar(dstDesc.fWidth),
305 SkIntToScalar(dstDesc.fHeight)); 304 SkIntToScalar(dstDesc.fHeight));
306 SkAutoTUnref<GrDrawContext> drawContext(ctx->drawContext()); 305 SkAutoTUnref<GrDrawContext> drawContext(ctx->drawContext());
307 if (!drawContext) { 306 if (!drawContext) {
308 return nullptr; 307 return nullptr;
309 } 308 }
310 309
311 drawContext->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, SkMa trix::I(), rect); 310 drawContext->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, SkMa trix::I(), rect);
(...skipping 12 matching lines...) Expand all
324 if (!dst) { 323 if (!dst) {
325 return nullptr; 324 return nullptr;
326 } 325 }
327 326
328 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight); 327 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight);
329 const SkIPoint dstP = SkIPoint::Make(0, 0); 328 const SkIPoint dstP = SkIPoint::Make(0, 0);
330 ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp); 329 ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp);
331 return dst; 330 return dst;
332 } 331 }
333 332
OLDNEW
« no previous file with comments | « src/image/SkImageShader.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698