OLD | NEW |
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 "GrTessellatingPathRenderer.h" | 8 #include "GrTessellatingPathRenderer.h" |
9 | 9 |
10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 SkPath fPath; | 242 SkPath fPath; |
243 GrStrokeInfo fStroke; | 243 GrStrokeInfo fStroke; |
244 SkMatrix fViewMatrix; | 244 SkMatrix fViewMatrix; |
245 SkRect fClipBounds; // in source space | 245 SkRect fClipBounds; // in source space |
246 GrXPOverridesForBatch fPipelineInfo; | 246 GrXPOverridesForBatch fPipelineInfo; |
247 | 247 |
248 typedef GrVertexBatch INHERITED; | 248 typedef GrVertexBatch INHERITED; |
249 }; | 249 }; |
250 | 250 |
251 bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) { | 251 bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) { |
| 252 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), |
| 253 "GrTessellatingPathRenderer::onDrawPath"); |
252 SkASSERT(!args.fAntiAlias); | 254 SkASSERT(!args.fAntiAlias); |
253 const GrRenderTarget* rt = args.fPipelineBuilder->getRenderTarget(); | 255 const GrRenderTarget* rt = args.fPipelineBuilder->getRenderTarget(); |
254 if (nullptr == rt) { | 256 if (nullptr == rt) { |
255 return false; | 257 return false; |
256 } | 258 } |
257 | 259 |
258 SkIRect clipBoundsI; | 260 SkIRect clipBoundsI; |
259 args.fPipelineBuilder->clip().getConservativeBounds(rt->width(), rt->height(
), &clipBoundsI); | 261 args.fPipelineBuilder->clip().getConservativeBounds(rt->width(), rt->height(
), &clipBoundsI); |
260 SkRect clipBounds = SkRect::Make(clipBoundsI); | 262 SkRect clipBounds = SkRect::Make(clipBoundsI); |
261 SkMatrix vmi; | 263 SkMatrix vmi; |
(...skipping 22 matching lines...) Expand all Loading... |
284 bool result = viewMatrix.invert(&vmi); | 286 bool result = viewMatrix.invert(&vmi); |
285 if (!result) { | 287 if (!result) { |
286 SkFAIL("Cannot invert matrix\n"); | 288 SkFAIL("Cannot invert matrix\n"); |
287 } | 289 } |
288 vmi.mapRect(&clipBounds); | 290 vmi.mapRect(&clipBounds); |
289 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); | 291 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); |
290 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); | 292 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); |
291 } | 293 } |
292 | 294 |
293 #endif | 295 #endif |
OLD | NEW |