| OLD | NEW |
| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget
(); | 156 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget
(); |
| 157 if (nullptr == rt) { | 157 if (nullptr == rt) { |
| 158 skiagm::GM::DrawGpuOnlyMessage(canvas); | 158 skiagm::GM::DrawGpuOnlyMessage(canvas); |
| 159 return; | 159 return; |
| 160 } | 160 } |
| 161 GrContext* context = rt->getContext(); | 161 GrContext* context = rt->getContext(); |
| 162 if (nullptr == context) { | 162 if (nullptr == context) { |
| 163 return; | 163 return; |
| 164 } | 164 } |
| 165 | 165 |
| 166 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt)); | 166 sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt))); |
| 167 if (!drawContext) { | 167 if (!drawContext) { |
| 168 return; | 168 return; |
| 169 } | 169 } |
| 170 | 170 |
| 171 SkScalar y = 0; | 171 SkScalar y = 0; |
| 172 static const SkScalar kDX = 12.f; | 172 static const SkScalar kDX = 12.f; |
| 173 for (PathList::Iter iter(fPaths, PathList::Iter::kHead_IterStart); | 173 for (PathList::Iter iter(fPaths, PathList::Iter::kHead_IterStart); |
| 174 iter.get(); | 174 iter.get(); |
| 175 iter.next()) { | 175 iter.next()) { |
| 176 const SkPath* path = iter.get(); | 176 const SkPath* path = iter.get(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 PathList fPaths; | 261 PathList fPaths; |
| 262 RectList fRects; | 262 RectList fRects; |
| 263 | 263 |
| 264 typedef GM INHERITED; | 264 typedef GM INHERITED; |
| 265 }; | 265 }; |
| 266 | 266 |
| 267 DEF_GM(return new ConvexPolyEffect;) | 267 DEF_GM(return new ConvexPolyEffect;) |
| 268 } | 268 } |
| 269 | 269 |
| 270 #endif | 270 #endif |
| OLD | NEW |