Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: src/gpu/GrAtlasTextContext.h

Issue 1191943002: Add useDFT field to SkDeviceProperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkDeviceProperties.h ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef GrAtlasTextContext_DEFINED 8 #ifndef GrAtlasTextContext_DEFINED
9 #define GrAtlasTextContext_DEFINED 9 #define GrAtlasTextContext_DEFINED
10 10
(...skipping 17 matching lines...) Expand all
28 class GrDrawTarget; 28 class GrDrawTarget;
29 class GrPipelineBuilder; 29 class GrPipelineBuilder;
30 class GrTextBlobCache; 30 class GrTextBlobCache;
31 31
32 /* 32 /*
33 * This class implements GrTextContext using standard bitmap fonts, and can also process textblobs. 33 * This class implements GrTextContext using standard bitmap fonts, and can also process textblobs.
34 * TODO replace GrBitmapTextContext 34 * TODO replace GrBitmapTextContext
35 */ 35 */
36 class GrAtlasTextContext : public GrTextContext { 36 class GrAtlasTextContext : public GrTextContext {
37 public: 37 public:
38 static GrAtlasTextContext* Create(GrContext*, GrDrawContext*, 38 static GrAtlasTextContext* Create(GrContext*, GrDrawContext*, const SkDevice Properties&);
39 const SkDeviceProperties&, bool enableDist anceFields);
40 39
41 private: 40 private:
42 GrAtlasTextContext(GrContext*, GrDrawContext*, const SkDeviceProperties&, bo ol useDFT); 41 GrAtlasTextContext(GrContext*, GrDrawContext*, const SkDeviceProperties&);
43 ~GrAtlasTextContext() override {} 42 ~GrAtlasTextContext() override {}
44 43
45 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, 44 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&,
46 const SkPaint&, const SkMatrix& viewMatrix) override; 45 const SkPaint&, const SkMatrix& viewMatrix) override;
47 46
48 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain t&, 47 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain t&,
49 const SkMatrix& viewMatrix, const char text[], size_t byteLe ngth, 48 const SkMatrix& viewMatrix, const char text[], size_t byteLe ngth,
50 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove rride; 49 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove rride;
51 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, 50 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&,
52 const SkPaint&, const SkMatrix& viewMatrix, 51 const SkPaint&, const SkMatrix& viewMatrix,
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 377
379 const SkScalar& operator[] (int i) const { 378 const SkScalar& operator[] (int i) const {
380 return fTable[i]; 379 return fTable[i];
381 } 380 }
382 381
383 SkScalar* fTable; 382 SkScalar* fTable;
384 }; 383 };
385 384
386 GrBatchTextStrike* fCurrStrike; 385 GrBatchTextStrike* fCurrStrike;
387 GrTextBlobCache* fCache; 386 GrTextBlobCache* fCache;
388 bool fEnableDFRendering;
389 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; 387 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable;
390 388
391 friend class GrTextBlobCache; 389 friend class GrTextBlobCache;
392 friend class BitmapTextBatch; 390 friend class BitmapTextBatch;
393 391
394 #ifdef GR_TEST_UTILS 392 #ifdef GR_TEST_UTILS
395 BATCH_TEST_FRIEND(TextBlobBatch); 393 BATCH_TEST_FRIEND(TextBlobBatch);
396 #endif 394 #endif
397 395
398 typedef GrTextContext INHERITED; 396 typedef GrTextContext INHERITED;
399 }; 397 };
400 398
401 #endif 399 #endif
OLDNEW
« no previous file with comments | « src/core/SkDeviceProperties.h ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698