| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrGLPathRange.h" | 9 #include "GrGLPathRange.h" |
| 10 #include "GrGLPath.h" | 10 #include "GrGLPath.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 fShouldFill = true; | 39 fShouldFill = true; |
| 40 } else { | 40 } else { |
| 41 fShouldStroke = fStroke.needToApply(); | 41 fShouldStroke = fStroke.needToApply(); |
| 42 fShouldFill = fStroke.isFillStyle() || | 42 fShouldFill = fStroke.isFillStyle() || |
| 43 fStroke.getStyle() == SkStrokeRec::kStrokeAndFill_Style; | 43 fStroke.getStyle() == SkStrokeRec::kStrokeAndFill_Style; |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 void GrGLPathRange::onInitPath(int index, const SkPath& origSkPath) const { | 47 void GrGLPathRange::onInitPath(int index, const SkPath& origSkPath) const { |
| 48 GrGLGpu* gpu = static_cast<GrGLGpu*>(this->getGpu()); | 48 GrGLGpu* gpu = static_cast<GrGLGpu*>(this->getGpu()); |
| 49 if (NULL == gpu) { | 49 if (nullptr == gpu) { |
| 50 return; | 50 return; |
| 51 } | 51 } |
| 52 | 52 |
| 53 // Make sure the path at this index hasn't been initted already. | 53 // Make sure the path at this index hasn't been initted already. |
| 54 SkDEBUGCODE( | 54 SkDEBUGCODE( |
| 55 GrGLboolean isPath; | 55 GrGLboolean isPath; |
| 56 GR_GL_CALL_RET(gpu->glInterface(), isPath, IsPath(fBasePathID + index)))
; | 56 GR_GL_CALL_RET(gpu->glInterface(), isPath, IsPath(fBasePathID + index)))
; |
| 57 SkASSERT(GR_GL_FALSE == isPath); | 57 SkASSERT(GR_GL_FALSE == isPath); |
| 58 | 58 |
| 59 const SkPath* skPath = &origSkPath; | 59 const SkPath* skPath = &origSkPath; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 } | 96 } |
| 97 | 97 |
| 98 INHERITED::onRelease(); | 98 INHERITED::onRelease(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void GrGLPathRange::onAbandon() { | 101 void GrGLPathRange::onAbandon() { |
| 102 fBasePathID = 0; | 102 fBasePathID = 0; |
| 103 | 103 |
| 104 INHERITED::onAbandon(); | 104 INHERITED::onAbandon(); |
| 105 } | 105 } |
| OLD | NEW |