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/device/xps/SkXPSDevice.cpp

Issue 41213003: Hook in rough distance field support for fonts (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Replace magic number 32 with constant; fix comment in shader; fix Linux compiler error. Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkDrawProcs.h ('k') | src/gpu/GrBitmapTextContext.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 2011 Google Inc. 2 * Copyright 2011 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 UNICODE 8 #ifndef UNICODE
9 #define UNICODE 9 #define UNICODE
10 #endif 10 #endif
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 xpsGlyph->verticalOffset = (SkFixedToFloat(y) * -procs->centemPerUnit) 2227 xpsGlyph->verticalOffset = (SkFixedToFloat(y) * -procs->centemPerUnit)
2228 - first.verticalOffset; 2228 - first.verticalOffset;
2229 } 2229 }
2230 } 2230 }
2231 2231
2232 static void text_draw_init(const SkPaint& paint, 2232 static void text_draw_init(const SkPaint& paint,
2233 const void* text, size_t byteLength, 2233 const void* text, size_t byteLength,
2234 SkBitSet& glyphsUsed, 2234 SkBitSet& glyphsUsed,
2235 SkDraw& myDraw, SkXPSDrawProcs& procs) { 2235 SkDraw& myDraw, SkXPSDrawProcs& procs) {
2236 procs.fD1GProc = xps_draw_1_glyph; 2236 procs.fD1GProc = xps_draw_1_glyph;
2237 #if SK_DISTANCEFIELD_FONTS
2238 procs.fFlags = 0;
2239 #endif
2237 size_t numGlyphGuess; 2240 size_t numGlyphGuess;
2238 switch (paint.getTextEncoding()) { 2241 switch (paint.getTextEncoding()) {
2239 case SkPaint::kUTF8_TextEncoding: 2242 case SkPaint::kUTF8_TextEncoding:
2240 numGlyphGuess = SkUTF8_CountUnichars( 2243 numGlyphGuess = SkUTF8_CountUnichars(
2241 static_cast<const char *>(text), 2244 static_cast<const char *>(text),
2242 byteLength); 2245 byteLength);
2243 break; 2246 break;
2244 case SkPaint::kUTF16_TextEncoding: 2247 case SkPaint::kUTF16_TextEncoding:
2245 numGlyphGuess = SkUTF16_CountUnichars( 2248 numGlyphGuess = SkUTF16_CountUnichars(
2246 static_cast<const uint16_t *>(text), 2249 static_cast<const uint16_t *>(text),
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 IID_PPV_ARGS(&this->fXpsFactory)), 2444 IID_PPV_ARGS(&this->fXpsFactory)),
2442 "Could not create factory for layer."); 2445 "Could not create factory for layer.");
2443 2446
2444 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), 2447 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas),
2445 "Could not create canvas for layer."); 2448 "Could not create canvas for layer.");
2446 } 2449 }
2447 2450
2448 bool SkXPSDevice::allowImageFilter(SkImageFilter*) { 2451 bool SkXPSDevice::allowImageFilter(SkImageFilter*) {
2449 return false; 2452 return false;
2450 } 2453 }
OLDNEW
« no previous file with comments | « src/core/SkDrawProcs.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698