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

Side by Side Diff: src/gpu/GrYUVProvider.cpp

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 1 month 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/GrTextureToYUVPlanes.cpp ('k') | src/gpu/SkGpuDevice.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 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 "GrRenderTargetContext.h" 9 #include "GrRenderTargetContext.h"
10 #include "GrTextureProxy.h"
10 #include "GrYUVProvider.h" 11 #include "GrYUVProvider.h"
11 #include "effects/GrGammaEffect.h" 12 #include "effects/GrGammaEffect.h"
12 #include "effects/GrYUVEffect.h" 13 #include "effects/GrYUVEffect.h"
13 14
14 #include "SkCachedData.h" 15 #include "SkCachedData.h"
15 #include "SkRefCnt.h" 16 #include "SkRefCnt.h"
16 #include "SkResourceCache.h" 17 #include "SkResourceCache.h"
17 #include "SkYUVPlanesCache.h" 18 #include "SkYUVPlanesCache.h"
18 19
19 namespace { 20 namespace {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 paint.addColorFragmentProcessor(GrGammaEffect::Make(2.2f)); 143 paint.addColorFragmentProcessor(GrGammaEffect::Make(2.2f));
143 } 144 }
144 } 145 }
145 146
146 paint.setPorterDuffXPFactory(SkBlendMode::kSrc); 147 paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
147 const SkRect r = SkRect::MakeIWH(yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY] .fWidth, 148 const SkRect r = SkRect::MakeIWH(yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY] .fWidth,
148 yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY].fHeight); 149 yuvInfo.fSizeInfo.fSizes[SkYUVSizeInfo::kY].fHeight);
149 150
150 renderTargetContext->drawRect(GrNoClip(), paint, SkMatrix::I(), r); 151 renderTargetContext->drawRect(GrNoClip(), paint, SkMatrix::I(), r);
151 152
152 return renderTargetContext->asTexture(); 153 sk_sp<GrTextureProxy> tp(renderTargetContext->asDeferredTexture());
154 return sk_ref_sp(tp->instantiate(ctx->textureProvider()));
153 } 155 }
OLDNEW
« no previous file with comments | « src/gpu/GrTextureToYUVPlanes.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698