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

Side by Side Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 879603003: Use highp for distance field texture coordinates. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | src/gpu/effects/GrDistanceFieldTextureEffect.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 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 "GrBitmapTextContext.h" 10 #include "GrBitmapTextContext.h"
(...skipping 15 matching lines...) Expand all
26 #include "SkPath.h" 26 #include "SkPath.h"
27 #include "SkRTConf.h" 27 #include "SkRTConf.h"
28 #include "SkStrokeRec.h" 28 #include "SkStrokeRec.h"
29 #include "effects/GrDistanceFieldTextureEffect.h" 29 #include "effects/GrDistanceFieldTextureEffect.h"
30 30
31 SK_CONF_DECLARE(bool, c_DumpFontCache, "gpu.dumpFontCache", false, 31 SK_CONF_DECLARE(bool, c_DumpFontCache, "gpu.dumpFontCache", false,
32 "Dump the contents of the font cache before every purge."); 32 "Dump the contents of the font cache before every purge.");
33 33
34 static const int kSmallDFFontSize = 32; 34 static const int kSmallDFFontSize = 32;
35 static const int kSmallDFFontLimit = 32; 35 static const int kSmallDFFontLimit = 32;
36 static const int kMediumDFFontSize = 78; 36 static const int kMediumDFFontSize = 64;
37 static const int kMediumDFFontLimit = 78; 37 static const int kMediumDFFontLimit = 64;
38 static const int kLargeDFFontSize = 192; 38 static const int kLargeDFFontSize = 128;
39 39
40 static const int kVerticesPerGlyph = 4; 40 static const int kVerticesPerGlyph = 4;
41 static const int kIndicesPerGlyph = 6; 41 static const int kIndicesPerGlyph = 6;
42 42
43 GrDistanceFieldTextContext::GrDistanceFieldTextContext(GrContext* context, 43 GrDistanceFieldTextContext::GrDistanceFieldTextContext(GrContext* context,
44 const SkDeviceProperties& properties, 44 const SkDeviceProperties& properties,
45 bool enable) 45 bool enable)
46 : GrTextContext(context, pro perties) { 46 : GrTextContext(context, pro perties) {
47 #if SK_FORCE_DISTANCE_FIELD_TEXT 47 #if SK_FORCE_DISTANCE_FIELD_TEXT
48 fEnableDFRendering = true; 48 fEnableDFRendering = true;
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 } 684 }
685 } 685 }
686 686
687 inline void GrDistanceFieldTextContext::finish() { 687 inline void GrDistanceFieldTextContext::finish() {
688 this->flush(); 688 this->flush();
689 fTotalVertexCount = 0; 689 fTotalVertexCount = 0;
690 690
691 GrTextContext::finish(); 691 GrTextContext::finish();
692 } 692 }
693 693
OLDNEW
« no previous file with comments | « no previous file | src/gpu/effects/GrDistanceFieldTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698