| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "GrDistanceFieldTextContext.h" | 8 #include "GrDistanceFieldTextContext.h" |
| 9 #include "GrAtlas.h" | 9 #include "GrAtlas.h" |
| 10 #include "GrAtlasTextContext.h" | 10 #include "GrAtlasTextContext.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 fVertexBounds.setLargestInverted(); | 69 fVertexBounds.setLargestInverted(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 GrDistanceFieldTextContext* GrDistanceFieldTextContext::Create(GrContext* contex
t, | 72 GrDistanceFieldTextContext* GrDistanceFieldTextContext::Create(GrContext* contex
t, |
| 73 SkGpuDevice* gpuD
evice, | 73 SkGpuDevice* gpuD
evice, |
| 74 const SkDevicePro
perties& props, | 74 const SkDevicePro
perties& props, |
| 75 bool enable) { | 75 bool enable) { |
| 76 GrDistanceFieldTextContext* textContext = SkNEW_ARGS(GrDistanceFieldTextCont
ext, | 76 GrDistanceFieldTextContext* textContext = SkNEW_ARGS(GrDistanceFieldTextCont
ext, |
| 77 (context, gpuDevice, pr
ops, enable)); | 77 (context, gpuDevice, pr
ops, enable)); |
| 78 #ifdef USE_BITMAP_TEXTBLOBS | 78 #ifdef USE_BITMAP_TEXTBLOBS |
| 79 textContext->fFallbackTextContext = GrBitmapTextContextB::Create(context, gp
uDevice, props); | 79 textContext->fFallbackTextContext = GrAtlasTextContext::Create(context, gpuD
evice, props); |
| 80 #else | 80 #else |
| 81 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu
Device, props); | 81 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpu
Device, props); |
| 82 #endif | 82 #endif |
| 83 | 83 |
| 84 return textContext; | 84 return textContext; |
| 85 } | 85 } |
| 86 | 86 |
| 87 GrDistanceFieldTextContext::~GrDistanceFieldTextContext() { | 87 GrDistanceFieldTextContext::~GrDistanceFieldTextContext() { |
| 88 SkSafeSetNull(fGammaTexture); | 88 SkSafeSetNull(fGammaTexture); |
| 89 } | 89 } |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 } | 737 } |
| 738 } | 738 } |
| 739 | 739 |
| 740 inline void GrDistanceFieldTextContext::finish() { | 740 inline void GrDistanceFieldTextContext::finish() { |
| 741 this->flush(); | 741 this->flush(); |
| 742 fTotalVertexCount = 0; | 742 fTotalVertexCount = 0; |
| 743 | 743 |
| 744 GrTextContext::finish(); | 744 GrTextContext::finish(); |
| 745 } | 745 } |
| 746 | 746 |
| OLD | NEW |