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

Side by Side Diff: src/ports/SkTypeface_win_dw.cpp

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase, just in case. Created 5 years, 11 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/ports/SkImageDecoder_empty.cpp ('k') | src/sfnt/SkOTUtils.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 "SkTypes.h" 8 #include "SkTypes.h"
9 // SkTypes will include Windows.h, which will pull in all of the GDI defines. 9 // SkTypes will include Windows.h, which will pull in all of the GDI defines.
10 // GDI #defines GetGlyphIndices to GetGlyphIndicesA or GetGlyphIndicesW, but 10 // GDI #defines GetGlyphIndices to GetGlyphIndicesA or GetGlyphIndicesW, but
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 int DWriteFontTypeface::onGetTableTags(SkFontTableTag tags[]) const { 179 int DWriteFontTypeface::onGetTableTags(SkFontTableTag tags[]) const {
180 DWRITE_FONT_FACE_TYPE type = fDWriteFontFace->GetType(); 180 DWRITE_FONT_FACE_TYPE type = fDWriteFontFace->GetType();
181 if (type != DWRITE_FONT_FACE_TYPE_CFF && 181 if (type != DWRITE_FONT_FACE_TYPE_CFF &&
182 type != DWRITE_FONT_FACE_TYPE_TRUETYPE && 182 type != DWRITE_FONT_FACE_TYPE_TRUETYPE &&
183 type != DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION) 183 type != DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION)
184 { 184 {
185 return 0; 185 return 0;
186 } 186 }
187 187
188 int ttcIndex; 188 int ttcIndex;
189 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex)); 189 SkAutoTDelete<SkStream> stream(this->openStream(&ttcIndex));
190 return stream.get() ? SkFontStream::GetTableTags(stream, ttcIndex, tags) : 0 ; 190 return stream.get() ? SkFontStream::GetTableTags(stream, ttcIndex, tags) : 0 ;
191 } 191 }
192 192
193 size_t DWriteFontTypeface::onGetTableData(SkFontTableTag tag, size_t offset, 193 size_t DWriteFontTypeface::onGetTableData(SkFontTableTag tag, size_t offset,
194 size_t length, void* data) const 194 size_t length, void* data) const
195 { 195 {
196 AutoDWriteTable table(fDWriteFontFace.get(), SkEndian_SwapBE32(tag)); 196 AutoDWriteTable table(fDWriteFontFace.get(), SkEndian_SwapBE32(tag));
197 if (!table.fExists) { 197 if (!table.fExists) {
198 return 0; 198 return 0;
199 } 199 }
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 getAdvanceData(fDWriteFontFace.get(), 458 getAdvanceData(fDWriteFontFace.get(),
459 glyphCount, 459 glyphCount,
460 glyphIDs, 460 glyphIDs,
461 glyphIDsCount, 461 glyphIDsCount,
462 getWidthAdvance)); 462 getWidthAdvance));
463 } 463 }
464 } 464 }
465 465
466 return info; 466 return info;
467 } 467 }
OLDNEW
« no previous file with comments | « src/ports/SkImageDecoder_empty.cpp ('k') | src/sfnt/SkOTUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698