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

Side by Side Diff: trunk/src/pdf/SkPDFDevice.cpp

Issue 12739006: move most of SkFontHost to private (preceeding making it all private) (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkPDFDevice.h" 10 #include "SkPDFDevice.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 if (paint.getTextAlign() == SkPaint::kCenter_Align) { 99 if (paint.getTextAlign() == SkPaint::kCenter_Align) {
100 xAdj = SkScalarHalf(xAdj); 100 xAdj = SkScalarHalf(xAdj);
101 yAdj = SkScalarHalf(yAdj); 101 yAdj = SkScalarHalf(yAdj);
102 } 102 }
103 *x = *x - xAdj; 103 *x = *x - xAdj;
104 *y = *y - yAdj; 104 *y = *y - yAdj;
105 } 105 }
106 106
107 static size_t max_glyphid_for_typeface(const SkTypeface* typeface) { 107 static size_t max_glyphid_for_typeface(const SkTypeface* typeface) {
108 SkAdvancedTypefaceMetrics* metrics; 108 SkAdvancedTypefaceMetrics* metrics;
109 metrics = SkFontHost::GetAdvancedTypefaceMetrics( 109 metrics = typeface->getAdvancedTypefaceMetrics(
110 SkTypeface::UniqueID(typeface),
111 SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo, 110 SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo,
112 NULL, 0); 111 NULL, 0);
113 112
114 int lastGlyphID = 0; 113 int lastGlyphID = 0;
115 if (metrics) { 114 if (metrics) {
116 lastGlyphID = metrics->fLastGlyphID; 115 lastGlyphID = metrics->fLastGlyphID;
117 metrics->unref(); 116 metrics->unref();
118 } 117 }
119 return lastGlyphID; 118 return lastGlyphID;
120 } 119 }
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 } 1802 }
1804 1803
1805 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, 1804 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y,
1806 SkCanvas::Config8888) { 1805 SkCanvas::Config8888) {
1807 return false; 1806 return false;
1808 } 1807 }
1809 1808
1810 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { 1809 bool SkPDFDevice::allowImageFilter(SkImageFilter*) {
1811 return false; 1810 return false;
1812 } 1811 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698