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

Side by Side Diff: gm/texturedomaineffect.cpp

Issue 1918003003: Bring sk_sp to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 // This test only works with the GPU backend. 8 // This test only works with the GPU backend.
9 9
10 #include "gm.h" 10 #include "gm.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 73 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
74 if (nullptr == rt) { 74 if (nullptr == rt) {
75 return; 75 return;
76 } 76 }
77 GrContext* context = rt->getContext(); 77 GrContext* context = rt->getContext();
78 if (nullptr == context) { 78 if (nullptr == context) {
79 skiagm::GM::DrawGpuOnlyMessage(canvas); 79 skiagm::GM::DrawGpuOnlyMessage(canvas);
80 return; 80 return;
81 } 81 }
82 82
83 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt)); 83 sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
84 if (!drawContext) { 84 if (!drawContext) {
85 return; 85 return;
86 } 86 }
87 87
88 SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp, 88 SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp,
89 GrTextureParams ::ClampNoFilter())); 89 GrTextureParams ::ClampNoFilter()));
90 if (!texture) { 90 if (!texture) {
91 return; 91 return;
92 } 92 }
93 93
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 }; 153 };
154 154
155 // Windows builds did not like SkScalar initialization in class :( 155 // Windows builds did not like SkScalar initialization in class :(
156 const SkScalar TextureDomainEffect::kDrawPad = 10.f; 156 const SkScalar TextureDomainEffect::kDrawPad = 10.f;
157 const SkScalar TextureDomainEffect::kTestPad = 10.f; 157 const SkScalar TextureDomainEffect::kTestPad = 10.f;
158 158
159 DEF_GM(return new TextureDomainEffect;) 159 DEF_GM(return new TextureDomainEffect;)
160 } 160 }
161 161
162 #endif 162 #endif
OLDNEW
« gm/beziereffects.cpp ('K') | « gm/texdata.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698