| 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 "GrDashLinePathRenderer.h" |   8 #include "GrDashLinePathRenderer.h" | 
|   9  |   9  | 
 |  10 #include "GrGpu.h" | 
|  10 #include "GrAuditTrail.h" |  11 #include "GrAuditTrail.h" | 
|  11 #include "GrGpu.h" |  | 
|  12 #include "GrPipelineBuilder.h" |  | 
|  13 #include "effects/GrDashingEffect.h" |  12 #include "effects/GrDashingEffect.h" | 
|  14  |  13  | 
|  15 bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { |  14 bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { | 
|  16     SkPoint pts[2]; |  15     SkPoint pts[2]; | 
|  17     bool inverted; |  16     bool inverted; | 
|  18     if (args.fShape->style().isDashed() && args.fShape->asLine(pts, &inverted)) 
    { |  17     if (args.fShape->style().isDashed() && args.fShape->asLine(pts, &inverted)) 
    { | 
|  19         // We should never have an inverse dashed case. |  18         // We should never have an inverse dashed case. | 
|  20         SkASSERT(!inverted); |  19         SkASSERT(!inverted); | 
|  21         return GrDashingEffect::CanDrawDashLine(pts, args.fShape->style(), *args
    .fViewMatrix); |  20         return GrDashingEffect::CanDrawDashLine(pts, args.fShape->style(), *args
    .fViewMatrix); | 
|  22     } |  21     } | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
|  47     if (!batch) { |  46     if (!batch) { | 
|  48         return false; |  47         return false; | 
|  49     } |  48     } | 
|  50  |  49  | 
|  51     GrPipelineBuilder pipelineBuilder(*args.fPaint, useHWAA); |  50     GrPipelineBuilder pipelineBuilder(*args.fPaint, useHWAA); | 
|  52     pipelineBuilder.setUserStencil(args.fUserStencilSettings); |  51     pipelineBuilder.setUserStencil(args.fUserStencilSettings); | 
|  53  |  52  | 
|  54     args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); |  53     args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); | 
|  55     return true; |  54     return true; | 
|  56 } |  55 } | 
| OLD | NEW |