aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGlyphCache.h
Commit message (Collapse)AuthorAge
...
* Revert of Use std::unique_ptr. (patchset #8 id:130001 of ↵Gravatar mtklein2016-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1780933003/ ) Reason for revert: Another Android ambiguity due to implicit bool... frameworks/base/core/jni/android/graphics/Utils.cpp:110:35: error: call of overloaded 'SkMemoryStream(SkAutoTUnref<SkData>&)' is ambiguous return new SkMemoryStream(data); Original issue's description: > Use std::unique_ptr. > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 > > Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450 TBR=bungeman@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1785353002
* Use std::unique_ptr.Gravatar mtklein2016-03-11
| | | | | | | | TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 Review URL: https://codereview.chromium.org/1780933003
* Revert of Use std::unique_ptr. (patchset #7 id:120001 of ↵Gravatar mtklein2016-03-10
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1780933003/ ) Reason for revert: Now we remember! The problem was Clank: https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/34329 Original issue's description: > Use std::unique_ptr. > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 TBR=bungeman@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1782973002
* Use std::unique_ptr.Gravatar mtklein2016-03-10
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1780933003
* Only use fake gamma with linear devices.Gravatar bungeman2016-02-22
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1711223003 Review URL: https://codereview.chromium.org/1711223003
* add helper to create fancy underlinesGravatar caryclark2016-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a couple of utility functions to SkPaint that return the bounds of glyphs between a pair of lines. The common use case envisioned generates the edges of descenders between the top and bottom bounds of an underline to allow computing a stroke that skips those descenders. The implementation stores a linked list in each glyph containing the bounds of the lines parallel to the advance and the outermost intersections within those bounds. When the glyph cache is constructed, the glyph path is intersected with the bounds and the extreme min and max values within the bounds is added to an intercept. Share the text to path iter to construct the data. Make a half-hearted attempt to support vertical text; while the vertical implementation is complete; surrounding code (e.g. paint align) has short-comings with vertical. R=fmalita@chromium.org, reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1654883003 Review URL: https://codereview.chromium.org/1654883003
* Revert of Stop using SkScalerContext::getAdvance() in SkGlyphCache. ↵Gravatar mtklein2015-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #2 id:20001 of https://codereview.chromium.org/1321243004/ ) Reason for revert: Suspect this is the cause of regressions in crbug.com/527445. It's triggering on Windows and Linux, where getting advances does less than getting full metrics. It's not triggering on Mac, where this CL was a no-op. Original issue's description: > Stop using SkScalerContext::getAdvance() in SkGlyphCache. > > We think it'll simplify things to just always get the full metrics. > On most platforms, it's no different, and we think the platforms that > do differ (FreeType) will be nearly just as cheap. > > Removing this distinction helps us make SkGlyphCaches concurrent by > removing a state (we-have-only-advances) from its logical state machine. > > We see no significant changes running SKPs before and after this CL. > That makes sense, of course, because the SKPs bake some of this into drawPosText. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/518a2923f11b819fa44ed5cff54155326959540f TBR=reed@google.com,bungeman@google.com,herb@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1383403003
* Revert of Parallel cache - preliminary (patchset #24 id:460001 of ↵Gravatar herb2015-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1264103003/ ) Reason for revert: Breaks DrMemory in the chrome roll. Original issue's description: > Parallel cache. > > TBR=reed@google.com > > BUG=skia:1330,528560 > > Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f > > Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec > > Committed: https://skia.googlesource.com/skia/+/014ffdb01ea5317614a1569efc30c50f06434222 TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:1330,528560 Review URL: https://codereview.chromium.org/1345903002
* Parallel cache.Gravatar herb2015-09-15
| | | | | | | | | | | | TBR=reed@google.com BUG=skia:1330,528560 Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec Review URL: https://codereview.chromium.org/1264103003
* Revert of Parallel cache - preliminary (patchset #23 id:440001 of ↵Gravatar jyasskin2015-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1264103003/ ) Also reverts https://codereview.chromium.org/1333003002/ which was layered on top. Reason for revert: Appears to leak GDI handles: http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Unit%20%28DrMemory%20full%29%20%282%29/builds/8247 ~~Dr.M~~ Error #1: HANDLE LEAK: GDI handle 0x03050a84 and 3 similar handle(s) were opened but not closed: ~~Dr.M~~ # 0 system call NtGdiCreateDIBSection ~~Dr.M~~ # 1 GDI32.dll!CreateDIBSection +0xdc (0x768ead23 <GDI32.dll+0x1ad23>) ~~Dr.M~~ # 2 skia.dll!HDCOffscreen::draw [third_party\skia\src\ports\skfonthost_win.cpp:499] ~~Dr.M~~ # 3 skia.dll!SkScalerContext_GDI::generateImage [third_party\skia\src\ports\skfonthost_win.cpp:1233] ~~Dr.M~~ # 4 skia.dll!SkScalerContext::getImage [third_party\skia\src\core\skscalercontext.cpp:530] ~~Dr.M~~ # 5 skia.dll!SkGlyphCache::OnceFillInImage [third_party\skia\src\core\skglyphcache.cpp:252] ~~Dr.M~~ # 6 skia.dll!sk_once_slow<> [third_party\skia\include\core\skonce.h:76] ~~Dr.M~~ # 7 skia.dll!SkGlyphCache::findImage [third_party\skia\src\core\skglyphcache.cpp:260] ~~Dr.M~~ # 8 skia.dll!D1G_RectClip [third_party\skia\src\core\skdraw.cpp:1479] ~~Dr.M~~ # 9 skia.dll!SkDraw::drawPosText [third_party\skia\src\core\skdraw.cpp:1838] ~~Dr.M~~ #10 skia.dll!SkBitmapDevice::drawPosText [third_party\skia\src\core\skbitmapdevice.cpp:348] ~~Dr.M~~ #11 skia.dll!SkCanvas::onDrawPosText [third_party\skia\src\core\skcanvas.cpp:2433] ~~Dr.M~~ #12 skia.dll!SkCanvas::drawPosText [third_party\skia\src\core\skcanvas.cpp:2507] ~~Dr.M~~ #13 skia.dll!SkRecords::Draw::draw<> [third_party\skia\src\core\skrecorddraw.cpp:109] ~~Dr.M~~ #14 skia.dll!SkRecord::Record::visit<> [third_party\skia\src\core\skrecord.h:170] ~~Dr.M~~ #15 skia.dll!SkRecordDraw [third_party\skia\src\core\skrecorddraw.cpp:55] ~~Dr.M~~ #16 skia.dll!SkBigPicture::playback [third_party\skia\src\core\skbigpicture.cpp:43] ~~Dr.M~~ #17 skia.dll!SkCanvas::onDrawPicture [third_party\skia\src\core\skcanvas.cpp:2800] ~~Dr.M~~ #18 skia.dll!SkCanvas::drawPicture [third_party\skia\src\core\skcanvas.cpp:2770] ~~Dr.M~~ #19 cc.dll!cc::DrawingDisplayItem::Raster [cc\playback\drawing_display_item.cc:51] ~~Dr.M~~ #20 cc.dll!cc::DisplayItemList::Raster [cc\playback\display_item_list.cc:107] ~~Dr.M~~ #21 cc.dll!cc::DisplayListRasterSource::RasterCommon [cc\playback\display_list_raster_source.cc:122] ~~Dr.M~~ #22 cc.dll!cc::DisplayListRasterSource::PlaybackToCanvas [cc\playback\display_list_raster_source.cc:100] ~~Dr.M~~ #23 cc.dll!cc::TileTaskWorkerPool::PlaybackToMemory [cc\raster\tile_task_worker_pool.cc:208] ~~Dr.M~~ #24 cc.dll!cc::OneCopyTileTaskWorkerPool::PlaybackAndCopyOnWorkerThread [cc\raster\one_copy_tile_task_worker_pool.cc:413] ~~Dr.M~~ #25 cc.dll!cc::`anonymous namespace'::RasterBufferImpl::Playback [cc\raster\one_copy_tile_task_worker_pool.cc:53] ~~Dr.M~~ #26 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::Raster [cc\tiles\tile_manager.cc:131] ~~Dr.M~~ #27 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::RunOnWorkerThread [cc\tiles\tile_manager.cc:90] ~~Dr.M~~ #28 cc.dll!cc::TaskGraphRunner::RunTaskWithLockAcquired [cc\raster\task_graph_runner.cc:418] ~~Dr.M~~ #29 cc.dll!cc::TaskGraphRunner::Run [cc\raster\task_graph_runner.cc:361] ~~Dr.M~~ #30 base.dll!base::SimpleThread::ThreadMain [base\threading\simple_thread.cc:66] ~~Dr.M~~ #31 base.dll!base::`anonymous namespace'::ThreadFunc [base\threading\platform_thread_win.cc:82] ~~Dr.M~~ #32 KERNEL32.dll!BaseThreadInitThunk +0x11 (0x7570337a <KERNEL32.dll+0x1337a>) ~~Dr.M~~ Note: @0:15:51.087 in thread 196 ~~Dr.M~~ Note: handles created with the same callstack are closed here: ~~Dr.M~~ Note: # 0 system call NtGdiDeleteObjectApp ~~Dr.M~~ Note: # 1 GDI32.dll!DeleteObject +0x149 (0x768e57d3 <GDI32.dll+0x157d3>) ~~Dr.M~~ Note: # 2 skia.dll!HDCOffscreen::draw [third_party\skia\src\ports\skfonthost_win.cpp:471] ~~Dr.M~~ Note: # 3 skia.dll!SkScalerContext_GDI::generateImage [third_party\skia\src\ports\skfonthost_win.cpp:1233] ~~Dr.M~~ Note: # 4 skia.dll!SkScalerContext::getImage [third_party\skia\src\core\skscalercontext.cpp:530] ~~Dr.M~~ Note: # 5 skia.dll!SkGlyphCache::OnceFillInImage [third_party\skia\src\core\skglyphcache.cpp:252] ~~Dr.M~~ Note: # 6 skia.dll!sk_once_slow<> [third_party\skia\include\core\skonce.h:76] ~~Dr.M~~ Note: # 7 skia.dll!SkGlyphCache::findImage [third_party\skia\src\core\skglyphcache.cpp:260] ~~Dr.M~~ Note: # 8 skia.dll!D1G_RectClip [third_party\skia\src\core\skdraw.cpp:1479] ~~Dr.M~~ Note: # 9 skia.dll!SkDraw::drawPosText [third_party\skia\src\core\skdraw.cpp:1838] ~~Dr.M~~ Note: #10 skia.dll!SkBitmapDevice::drawPosText [third_party\skia\src\core\skbitmapdevice.cpp:348] ~~Dr.M~~ Note: #11 skia.dll!SkCanvas::onDrawPosText [third_party\skia\src\core\skcanvas.cpp:2433] ~~Dr.M~~ Note: #12 skia.dll!SkCanvas::drawPosText [third_party\skia\src\core\skcanvas.cpp:2507] ~~Dr.M~~ Note: #13 skia.dll!SkRecords::Draw::draw<> [third_party\skia\src\core\skrecorddraw.cpp:109] ~~Dr.M~~ Note: #14 skia.dll!SkRecord::Record::visit<> [third_party\skia\src\core\skrecord.h:170] ~~Dr.M~~ Note: #15 skia.dll!SkRecordDraw [third_party\skia\src\core\skrecorddraw.cpp:55] ~~Dr.M~~ Note: #16 skia.dll!SkBigPicture::playback [third_party\skia\src\core\skbigpicture.cpp:43] ~~Dr.M~~ Note: #17 skia.dll!SkCanvas::onDrawPicture [third_party\skia\src\core\skcanvas.cpp:2800] ~~Dr.M~~ Note: #18 skia.dll!SkCanvas::drawPicture [third_party\skia\src\core\skcanvas.cpp:2770] ~~Dr.M~~ Note: #19 cc.dll!cc::DrawingDisplayItem::Raster [cc\playback\drawing_display_item.cc:51] ~~Dr.M~~ Note: #20 cc.dll!cc::DisplayItemList::Raster [cc\playback\display_item_list.cc:107] ~~Dr.M~~ Note: #21 cc.dll!cc::DisplayListRasterSource::RasterCommon [cc\playback\display_list_raster_source.cc:122] ~~Dr.M~~ Note: #22 cc.dll!cc::DisplayListRasterSource::PlaybackToCanvas [cc\playback\display_list_raster_source.cc:100] ~~Dr.M~~ Note: #23 cc.dll!cc::TileTaskWorkerPool::PlaybackToMemory [cc\raster\tile_task_worker_pool.cc:208] ~~Dr.M~~ Note: #24 cc.dll!cc::OneCopyTileTaskWorkerPool::PlaybackAndCopyOnWorkerThread [cc\raster\one_copy_tile_task_worker_pool.cc:413] ~~Dr.M~~ Note: #25 cc.dll!cc::`anonymous namespace'::RasterBufferImpl::Playback [cc\raster\one_copy_tile_task_worker_pool.cc:53] ~~Dr.M~~ Note: #26 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::Raster [cc\tiles\tile_manager.cc:131] ~~Dr.M~~ Note: #27 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::RunOnWorkerThread [cc\tiles\tile_manager.cc:90] ~~Dr.M~~ Note: #28 cc.dll!cc::TaskGraphRunner::RunTaskWithLockAcquired [cc\raster\task_graph_runner.cc:418] ~~Dr.M~~ Note: #29 cc.dll!cc::TaskGraphRunner::Run [cc\raster\task_graph_runner.cc:361] ~~Dr.M~~ Note: #30 base.dll!base::SimpleThread::ThreadMain [base\threading\simple_thread.cc:66] ~~Dr.M~~ Note: #31 base.dll!base::`anonymous namespace'::ThreadFunc [base\threading\platform_thread_win.cc:82] ~~Dr.M~~ Note: #32 KERNEL32.dll!BaseThreadInitThunk +0x11 (0x7570337a <KERNEL32.dll+0x1337a>) Original issue's description: > Parallel cache. > > TBR=reed@google.com > > BUG=skia:1330 > > Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f > > Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org,herb@google.com BUG=skia:1330 [mtklein mucking around] NOTREECHECKS=true Review URL: https://codereview.chromium.org/1339493002
* Parallel cache.Gravatar herb2015-09-09
| | | | | | | | | | TBR=reed@google.com BUG=skia:1330 Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f Review URL: https://codereview.chromium.org/1264103003
* Revert of Parallel cache - preliminary (patchset #22 id:420001 of ↵Gravatar herb2015-09-04
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1264103003/ ) Reason for revert: Seems to freeze android devices. Original issue's description: > Parallel cache. > > TBR=reed@google.com > > BUG=skia:1330 > > Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:1330 Review URL: https://codereview.chromium.org/1327703003
* Parallel cache.Gravatar herb2015-09-04
| | | | | | | | TBR=reed@google.com BUG=skia:1330 Review URL: https://codereview.chromium.org/1264103003
* Stop using SkScalerContext::getAdvance() in SkGlyphCache.Gravatar mtklein2015-09-01
| | | | | | | | | | | | | | | | We think it'll simplify things to just always get the full metrics. On most platforms, it's no different, and we think the platforms that do differ (FreeType) will be nearly just as cheap. Removing this distinction helps us make SkGlyphCaches concurrent by removing a state (we-have-only-advances) from its logical state machine. We see no significant changes running SKPs before and after this CL. That makes sense, of course, because the SKPs bake some of this into drawPosText. BUG=skia: Review URL: https://codereview.chromium.org/1321243004
* [tracing] Add support for skia caches to dump memory statsGravatar ssid2015-08-27
| | | | | | | | | Dump the memory statistics of resource cache and glyph cache using the SkTraceMemoryDump interface. BUG=chromium:503168 Review URL: https://codereview.chromium.org/1313793004
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* private iterator to visit all resource cache entriesGravatar reed2015-08-19
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1271033002
* Change the GlyphCache to use a hash table instead of doing its own ad-hocGravatar herb2015-07-21
| | | | | | | hashing. This change appears to be performance neutral. BUG=skia: Review URL: https://codereview.chromium.org/1216983003
* Cleanup: Comment and ordering changes.Gravatar herb2015-06-24
| | | | | | | This should be a whitespace only change. BUG=skia: Review URL: https://codereview.chromium.org/1194423004
* remove SkDevicePropertiesGravatar robertphillips2015-06-19
| | | | | | There is a lot more clean up to do here but this is probably a big enough bite. Review URL: https://codereview.chromium.org/1196683003
* Fix uninitialized memory bug in the SkGlyphCache.Gravatar herb2015-03-05
| | | | | | | | | | | | | | | | | | | The core of the problem is that the system is asked to lookup the metrics for a character with id == 0. This causes a hit in the fCharToGlyphHash matching the sentinel glyph. This happens because fCharToGlpyhHash is initialized with all zeros, therefore, the fID is zero matching the char with id == 0. The fAdvanceX field of the sentinel glyph is in fact not initialized. The bigger question is now did a zero character get passed to getUnicharMetrics? The breaking code is basically as follows: wchar_t glyph = L'S'; paint.measureText(&glyph, 2); This get mischaracterized as a utf8 string instead of a utf16(?) string. Because of the little endian ordering, this is the character string 'L' '\0'. Since the size of the original string is two bytes (but a single character) the '\0' is treated as its own character and past to getUnicharMetrics. TEST: On windows failed using DrMemory. With this change does not fail. BUG=463204 Review URL: https://codereview.chromium.org/977063002
* Make the glyph array entries inline.Gravatar herb2015-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perf Reports bin/c --match nytimes --config 8888 desk_nytimes.skp_1_mpd 1.41ms -> 1.38ms 0.98x desk_nytimes.skp_1 1.94ms -> 1.87ms 0.97x bin/c --match nytimes --config gpu desk_nytimes.skp_1_mpd 1.63ms -> 1.59ms 0.97x desk_nytimes.skp_1 1.56ms -> 1.5ms 0.97x Here are results from mac instruments: --match nytimes --config gpu --samples 10000 --skps /Users/herb/src/skia/skps Inline: Total Samples Running Time Self Symbol Name 94335 94335.0ms 98.3% 0.0 start 2365 2365.0ms 2.4% 2365.0 SkGlyphCache::getGlyphIDMetrics(unsigned short, int, int) 975 975.0ms 1.0% 975.0 SkGlyphCache::lookupMetrics(unsigned int, SkGlyphCache::MetricsType) Clean: Total Samples Running Time Self Symbol Name 96833 96833.0ms 97.3% 0.0 start 3418 3418.0ms 3.4% 3418.0 SkGlyphCache::getGlyphIDMetrics(unsigned short, int, int) 1961 1961.0ms 1.9% 1961.0 SkGlyphCache::lookupMetrics(unsigned int, SkGlyphCache::MetricsType) BUG=skia: Committed: https://skia.googlesource.com/skia/+/4c08f16b252a55e438a61f26e5581394ed177da1 Committed: https://skia.googlesource.com/skia/+/b4c29ac173e6f8844327338687248b98bc94132d Review URL: https://codereview.chromium.org/885903002
* Revert of Make the glyph array entries inline. (patchset #11 id:190001 of ↵Gravatar mtklein2015-02-09
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/885903002/) Reason for revert: Still broken. Original issue's description: > Make the glyph array entries inline. > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4c08f16b252a55e438a61f26e5581394ed177da1 > > Committed: https://skia.googlesource.com/skia/+/b4c29ac173e6f8844327338687248b98bc94132d TBR=reed@google.com,herb@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/911513003
* Make the glyph array entries inline.Gravatar herb2015-02-09
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/4c08f16b252a55e438a61f26e5581394ed177da1 Review URL: https://codereview.chromium.org/885903002
* Revert of Make the glyph array entries inline. (patchset #10 id:170001 of ↵Gravatar bsalomon2015-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/885903002/) Reason for revert: I suspect this is causing the off-by-one character issues that show up in gold.skia.org as of now. All the errors I've seen are on a Win7 bot. Example: good: https://gold.skia.org/img/images/35396bb0d299b81c0031dc0632a019d4.png bad: https://gold.skia.org/img/images/484e511f9e696d95031cd25aeae59da0.png Original issue's description: > Make the glyph array entries inline. > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4c08f16b252a55e438a61f26e5581394ed177da1 TBR=mtklein@google.com,reed@google.com,herb@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/897463004
* Make the glyph array entries inline.Gravatar herb2015-02-02
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/885903002
* Make char hash dynamic when needed.Gravatar herb2015-01-28
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/880383002
* Use murmur3 finisher to improve font hash efficiency.Gravatar reed2015-01-28
| | | | | | | | | | Add dump() method to inspect glyphcache strikes. Murmur addition improves hash efficient roughly 50% BUG=skia: Review URL: https://codereview.chromium.org/877113002
* Revert of patch from issue 885453002 at patchset 20001 ↵Gravatar mtklein2015-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (http://crrev.com/885453002#ps20001) (patchset #1 id:1 of https://codereview.chromium.org/881953002/) Reason for revert: ==32435==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x621000d8cd00 Lots of info here: http://build.chromium.org/p/client.skia/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-ASAN/builds/1198/steps/dm/logs/stdio Original issue's description: > patch from issue 885453002 at patchset 20001 (http://crrev.com/885453002#ps20001) > > Make the char cache dynamic in SkGlyphCache > because it is rarely used. > > Landing on behalf of Herb. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/95faa61d63a6f62916f6f7be58c4624da8357e3b TBR=mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/881023003
* patch from issue 885453002 at patchset 20001 ↵Gravatar mtklein2015-01-27
| | | | | | | | | | | | | (http://crrev.com/885453002#ps20001) Make the char cache dynamic in SkGlyphCache because it is rarely used. Landing on behalf of Herb. BUG=skia: Review URL: https://codereview.chromium.org/881953002
* Remove distance field generation and storage from SkGlyphCache.Gravatar jvanverth2015-01-07
| | | | | | BUG=skia:3103 Review URL: https://codereview.chromium.org/834103004
* Comment out unused names in src/core/SkGlyphCache.hGravatar tomhudson2015-01-06
| | | | | | | | | | | | Android violates our encapsulation and depends on this file; to keep their compiles clean they want us to hide the names of unused parameters. Follow-up to https://codereview.chromium.org/726923002/. R=djsollen@google.com Review URL: https://codereview.chromium.org/839583005
* Remove unused SkGlyphCache::VisitAllCaches.Gravatar bungeman2014-08-18
| | | | | | | | R=reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/472153002
* Remove ALL font fallback logic from Skia.Gravatar djsollen2014-08-06
| | | | | | | | R=reed@google.com, bungeman@google.com, caryclark@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/434623002
* Gamma correction for distance field text.Gravatar jvanverth2014-06-10
| | | | | | | | | | | | | | Handles both non-LCD and LCD text. Uses a texture to look up the gamma correction values for a given text color or luminance. BUG=skia: Committed: https://skia.googlesource.com/skia/+/4d517fdbb145cb95e5e935470df331e1b6667cfc R=reed@google.com, bungeman@google.com, robertphillips@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/258883002
* Revert of Gamma correction for distance field text. ↵Gravatar scroggo2014-06-09
| | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/258883002/) Reason for revert: Memory leaks. I suspect this is due to the lack of destructors in SkAutoGlyphCache Original issue's description: > Gamma correction for distance field text. > > Handles both non-LCD and LCD text. Uses a texture to look up the gamma correction values for a given text color or luminance. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4d517fdbb145cb95e5e935470df331e1b6667cfc NOTRY=true NOTREECHECKS=true R=reed@google.com, bungeman@google.com, robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/323513005
* Gamma correction for distance field text.Gravatar jvanverth2014-06-09
| | | | | | | | | | | Handles both non-LCD and LCD text. Uses a texture to look up the gamma correction values for a given text color or luminance. BUG=skia: R=reed@google.com, bungeman@google.com, robertphillips@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/258883002
* Move distance field generation to the glyph cache.Gravatar commit-bot@chromium.org2014-04-14
| | | | | | | | | | | | | | Distance fields are currently created in GrTextStrike, which is the wrong place. This moves that to the glyph cache where it belongs. As part of my testing, I found that when we fall back to paths in the GrDistanceFieldTextContext it was not scaling them properly, so that's fixed in here too. R=robertphillips@google.com, reed@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/227593010 git-svn-id: http://skia.googlecode.com/svn/trunk@14193 2bbb7eff-a529-9590-31e7-b0007b416f81
* Minor changes to GrFontCache system.Gravatar commit-bot@chromium.org2014-04-01
| | | | | | | | | | | | The main change is parameterizing the GrAtlasMgr so it can have a different sized backing texture and a different number of plots. This is in support of the saveLayer cache which has a smaller backing texture and only one plot. R=jvanverth@google.com, bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/217423014 git-svn-id: http://skia.googlecode.com/svn/trunk@14011 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12427Gravatar rmistry@google.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unused fields from SkGlyphCache.Gravatar bungeman@google.com2013-11-26
| | | | | | Review URL: https://codereview.chromium.org/89423003 git-svn-id: http://skia.googlecode.com/svn/trunk@12407 2bbb7eff-a529-9590-31e7-b0007b416f81
* Guard against most unintentionally ephemeral SkAutoFoo instantiations.Gravatar commit-bot@chromium.org2013-11-18
| | | | | | | | | | | | | | | | | | | I think I applied the trick everywhere possible. Limitations: - can't be used with templated classes - all constructors and destructors must be defined inline A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I deleted them. This change caught the same bugs Cary found in SkPath, plus one more in SampleApp. BUG= R=reed@google.com, caryclark@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/72603005 git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
* add counting to Globals, and refactor some for clarityGravatar reed@google.com2013-09-26
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/24447003 git-svn-id: http://skia.googlecode.com/svn/trunk@11484 2bbb7eff-a529-9590-31e7-b0007b416f81
* restore hash size to 8 bits, following windows fix in ↵Gravatar reed@google.com2013-07-10
| | | | | | 3591f7a4a56153349240dfc542cc61a11fab2487 git-svn-id: http://skia.googlecode.com/svn/trunk@9959 2bbb7eff-a529-9590-31e7-b0007b416f81
* move failable work outside of constructors for SkGlyphCache and ↵Gravatar reed@google.com2013-07-09
| | | | | | | | | | SkScalerContextGDI. If we fail, try to purge everything and try again, in case the failure was from memory/os-resource exhaustion (e.g. out of HDC handles in windows) BUG= Review URL: https://codereview.chromium.org/18132009 git-svn-id: http://skia.googlecode.com/svn/trunk@9930 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of r9581 (oops, fix missing change in 9532, setting hashbits to 8) ↵Gravatar robertphillips@google.com2013-07-03
| | | | | | due to Chromium assert failure (https://code.google.com/p/chromium/issues/detail?id=256476) git-svn-id: http://skia.googlecode.com/svn/trunk@9886 2bbb7eff-a529-9590-31e7-b0007b416f81
* combine glyph and image bulk alloc, and adjust initial alloc size, to reduce ↵Gravatar reed@google.com2013-06-19
| | | | | | | | | | | | total waste from 50% to 30% add diagnostics to measure cache efficiency BUG= Review URL: https://codereview.chromium.org/17449012 git-svn-id: http://skia.googlecode.com/svn/trunk@9691 2bbb7eff-a529-9590-31e7-b0007b416f81
* oops, fix missing change in 9532, setting hashbits to 8Gravatar reed@google.com2013-06-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9581 2bbb7eff-a529-9590-31e7-b0007b416f81
* use 8 bits for fontcache hashGravatar reed@google.com2013-06-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9532 2bbb7eff-a529-9590-31e7-b0007b416f81