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

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: 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
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 procs.fFlags = 0;
2237 size_t numGlyphGuess; 2238 size_t numGlyphGuess;
2238 switch (paint.getTextEncoding()) { 2239 switch (paint.getTextEncoding()) {
2239 case SkPaint::kUTF8_TextEncoding: 2240 case SkPaint::kUTF8_TextEncoding:
2240 numGlyphGuess = SkUTF8_CountUnichars( 2241 numGlyphGuess = SkUTF8_CountUnichars(
2241 static_cast<const char *>(text), 2242 static_cast<const char *>(text),
2242 byteLength); 2243 byteLength);
2243 break; 2244 break;
2244 case SkPaint::kUTF16_TextEncoding: 2245 case SkPaint::kUTF16_TextEncoding:
2245 numGlyphGuess = SkUTF16_CountUnichars( 2246 numGlyphGuess = SkUTF16_CountUnichars(
2246 static_cast<const uint16_t *>(text), 2247 static_cast<const uint16_t *>(text),
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 IID_PPV_ARGS(&this->fXpsFactory)), 2442 IID_PPV_ARGS(&this->fXpsFactory)),
2442 "Could not create factory for layer."); 2443 "Could not create factory for layer.");
2443 2444
2444 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), 2445 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas),
2445 "Could not create canvas for layer."); 2446 "Could not create canvas for layer.");
2446 } 2447 }
2447 2448
2448 bool SkXPSDevice::allowImageFilter(SkImageFilter*) { 2449 bool SkXPSDevice::allowImageFilter(SkImageFilter*) {
2449 return false; 2450 return false;
2450 } 2451 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698