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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp

Issue 2178883002: Added purge method to SimpleFontData and PlatformFontData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Brent Fulgham 2 * Copyright (C) 2011 Brent Fulgham
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 const size_t tableSize = m_typeface->getTableSize(tag); 340 const size_t tableSize = m_typeface->getTableSize(tag);
341 if (tableSize) { 341 if (tableSize) {
342 Vector<char> tableBuffer(tableSize); 342 Vector<char> tableBuffer(tableSize);
343 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]); 343 m_typeface->getTableData(tag, 0, tableSize, &tableBuffer[0]);
344 buffer = SharedBuffer::adoptVector(tableBuffer); 344 buffer = SharedBuffer::adoptVector(tableBuffer);
345 } 345 }
346 return buffer.release(); 346 return buffer.release();
347 } 347 }
348 348
349 void FontPlatformData::purgeMemory()
350 {
351 m_typeface = nullptr;
drott 2016/07/25 12:28:07 I don't think this is safe at the moment.
352 m_harfBuzzFace = nullptr;
353 }
354
349 } // namespace blink 355 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontPlatformData.h ('k') | third_party/WebKit/Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698