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