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 #include "GrAtlasTextContext.h" | 7 #include "GrAtlasTextContext.h" |
8 | 8 |
9 #include "GrBatchFontCache.h" | 9 #include "GrBatchFontCache.h" |
10 #include "GrBatchTarget.h" | 10 #include "GrBatchTarget.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "SkDrawProcs.h" | 29 #include "SkDrawProcs.h" |
30 #include "SkGlyphCache.h" | 30 #include "SkGlyphCache.h" |
31 #include "SkGpuDevice.h" | 31 #include "SkGpuDevice.h" |
32 #include "SkGr.h" | 32 #include "SkGr.h" |
33 #include "SkPath.h" | 33 #include "SkPath.h" |
34 #include "SkRTConf.h" | 34 #include "SkRTConf.h" |
35 #include "SkStrokeRec.h" | 35 #include "SkStrokeRec.h" |
36 #include "SkTextBlob.h" | 36 #include "SkTextBlob.h" |
37 #include "SkTextMapStateProc.h" | 37 #include "SkTextMapStateProc.h" |
38 | 38 |
39 #include "batches/GrBatch.h" | 39 #include "batches/GrVertexBatch.h" |
40 | 40 |
41 #include "effects/GrBitmapTextGeoProc.h" | 41 #include "effects/GrBitmapTextGeoProc.h" |
42 #include "effects/GrDistanceFieldGeoProc.h" | 42 #include "effects/GrDistanceFieldGeoProc.h" |
43 | 43 |
44 namespace { | 44 namespace { |
45 static const size_t kLCDTextVASize = sizeof(SkPoint) + sizeof(SkIPoint16); | 45 static const size_t kLCDTextVASize = sizeof(SkPoint) + sizeof(SkIPoint16); |
46 | 46 |
47 // position + local coord | 47 // position + local coord |
48 static const size_t kColorTextVASize = sizeof(SkPoint) + sizeof(SkIPoint16); | 48 static const size_t kColorTextVASize = sizeof(SkPoint) + sizeof(SkIPoint16); |
49 | 49 |
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2282 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat
rix, text, | 2282 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat
rix, text, |
2283 static_cast<size_t>(textLen), 0, 0,
noClip)); | 2283 static_cast<size_t>(textLen), 0, 0,
noClip)); |
2284 | 2284 |
2285 SkScalar transX = static_cast<SkScalar>(random->nextU()); | 2285 SkScalar transX = static_cast<SkScalar>(random->nextU()); |
2286 SkScalar transY = static_cast<SkScalar>(random->nextU()); | 2286 SkScalar transY = static_cast<SkScalar>(random->nextU()); |
2287 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0]
; | 2287 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0]
; |
2288 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t
ransY, skPaint); | 2288 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t
ransY, skPaint); |
2289 } | 2289 } |
2290 | 2290 |
2291 #endif | 2291 #endif |
OLD | NEW |