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

Issue 1405463004: [SkTextBlob] Remove incorrect builder assert (Closed)

Created:
5 years, 2 months ago by f(malita)
Modified:
5 years, 2 months ago
Reviewers:
bungeman-skia, eae, reed1
CC:
reviews_skia.org
Base URL:
https://chromium.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

[SkTextBlob] Remove incorrect builder assert At the end of TightRunBounds, glyphPosX cannot exceed the start of the next run. But glyphPosY is running ahead of glyphPosX (for kFull_Positioning) => the glyphPosY assert is incorrect. Since the two pointers advance in lock-step, there isn't much value in the glyphPosY assert anyway - we might as well remove it. BUG=chromium:542643 R=reed@google.com,bungeman@google.com Committed: https://skia.googlesource.com/skia/+/9ae8fe1c601ecb7fef9962f9eb1adf11032378e4

Patch Set 1 #

Patch Set 2 : win build fix #

Patch Set 3 : win fix reloaded #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -3 lines) Patch
M src/core/SkTextBlob.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M tests/TextBlobTest.cpp View 1 2 1 chunk +16 lines, -1 line 0 comments Download

Messages

Total messages: 20 (8 generated)
f(malita)
5 years, 2 months ago (2015-10-13 15:29:45 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405463004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405463004/1
5 years, 2 months ago (2015-10-13 15:30:04 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/3713)
5 years, 2 months ago (2015-10-13 15:32:34 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405463004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405463004/20001
5 years, 2 months ago (2015-10-13 15:45:23 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/3714)
5 years, 2 months ago (2015-10-13 15:47:36 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405463004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405463004/40001
5 years, 2 months ago (2015-10-13 15:50:40 UTC) #11
bungeman-skia
lgtm
5 years, 2 months ago (2015-10-13 15:52:01 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-13 15:57:48 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405463004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405463004/40001
5 years, 2 months ago (2015-10-13 15:58:30 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://skia.googlesource.com/skia/+/9ae8fe1c601ecb7fef9962f9eb1adf11032378e4
5 years, 2 months ago (2015-10-13 15:59:29 UTC) #17
eae
Thanks!
5 years, 2 months ago (2015-10-13 16:03:00 UTC) #19
bsalomon
5 years, 2 months ago (2015-10-14 13:14:44 UTC) #20
Message was sent while issue was closed.
Are the uninit errors on the valgrind bot attributable to this change?

http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2...


ex:
==32300== Use of uninitialised value of size 8
==32300==    at 0x697F64: SkGlyphCache::lookupByPackedGlyphID(unsigned int,
SkGlyphCache::MetricsType) (SkTHash.h:179)
==32300==    by 0x698010: SkGlyphCache::getGlyphIDMetrics(unsigned short)
(SkGlyphCache.cpp:145)
==32300==    by 0x6AAA70: sk_getMetrics_glyph_next(SkGlyphCache*, char const**)
(SkPaint.cpp:579)
==32300==    by 0x6ADF35: SkPaint::getTextWidths(void const*, unsigned long,
float*, SkRect*) const (SkPaint.cpp:1150)
==32300==    by 0x6E7933:
SkTextBlobBuilder::TightRunBounds(SkTextBlob::RunRecord const&)
(SkTextBlob.cpp:383)
==32300==    by 0x6E7BE0:
SkTextBlobBuilder::ConservativeRunBounds(SkTextBlob::RunRecord const&)
(SkTextBlob.cpp:421)
==32300==    by 0x6E7DA2: SkTextBlobBuilder::updateDeferredBounds()
(SkTextBlob.cpp:474)
==32300==    by 0x6E829D: SkTextBlobBuilder::build() (SkTextBlob.cpp:614)
==32300==    by 0x58538E: TextBlobTester::TestBounds(skiatest::Reporter*)
(TextBlobTest.cpp:165)
==32300==    by 0x584D45: test_TextBlob_builder(skiatest::Reporter*,
GrContextFactory*) (TextBlobTest.cpp:257)
==32300==    by 0x408B8C: run_test(skiatest::Test*) (DM.cpp:980)
==32300==    by 0x6E6E11: (anonymous namespace)::ThreadPool::Loop(void*)
(SkTaskGroup.cpp:176)
==32300==    by 0x7FA3B6: thread_start(void*) (SkThreadUtils_pthread.cpp:66)
==32300==    by 0x5058181: start_thread (pthread_create.c:312)
==32300==    by 0x628400C: clone (clone.S:111)
==32300==  Uninitialised value was created by a heap allocation
==32300==    at 0x4C2AB80: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32300==    by 0x4C2CF1F: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32300==    by 0x805DBA: sk_realloc_throw(void*, unsigned long)
(SkMemory_malloc.cpp:44)
==32300==    by 0x6E7E35: SkTextBlobBuilder::reserve(unsigned long)
(SkTemplates.h:271)
==32300==    by 0x6E8106: SkTextBlobBuilder::allocInternal(SkPaint const&,
SkTextBlob::GlyphPositioning, int, SkPoint, SkRect const*) (SkTextBlob.cpp:559)
==32300==    by 0x6E828A: SkTextBlobBuilder::allocRunPos(SkPaint const&, int,
SkRect const*) (SkTextBlob.cpp:606)
==32300==    by 0x585344: TextBlobTester::TestBounds(skiatest::Reporter*)
(TextBlobTest.cpp:162)
==32300==    by 0x584D45: test_TextBlob_builder(skiatest::Reporter*,
GrContextFactory*) (TextBlobTest.cpp:257)
==32300==    by 0x408B8C: run_test(skiatest::Test*) (DM.cpp:980)
==32300==    by 0x6E6E11: (anonymous namespace)::ThreadPool::Loop(void*)
(SkTaskGroup.cpp:176)
==32300==    by 0x7FA3B6: thread_start(void*) (SkThreadUtils_pthread.cpp:66)
==32300==    by 0x5058181: start_thread (pthread_create.c:312)
==32300==    by 0x628400C: clone (clone.S:111)
==32300== 
{
   <insert_a_suppression_name_here>
   Memcheck:Value8
   fun:_ZN12SkGlyphCache21lookupByPackedGlyphIDEjNS_11MetricsTypeE
   fun:_ZN12SkGlyphCache17getGlyphIDMetricsEt
   fun:_ZL24sk_getMetrics_glyph_nextP12SkGlyphCachePPKc
   fun:_ZNK7SkPaint13getTextWidthsEPKvmPfP6SkRect
   fun:_ZN17SkTextBlobBuilder14TightRunBoundsERKN10SkTextBlob9RunRecordE
   fun:_ZN17SkTextBlobBuilder21ConservativeRunBoundsERKN10SkTextBlob9RunRecordE
   fun:_ZN17SkTextBlobBuilder20updateDeferredBoundsEv
   fun:_ZN17SkTextBlobBuilder5buildEv
   fun:_ZN14TextBlobTester10TestBoundsEPN8skiatest8ReporterE
   fun:_ZL21test_TextBlob_builderPN8skiatest8ReporterEP16GrContextFactory
   fun:_ZL8run_testPN8skiatest4TestE
   fun:_ZN12_GLOBAL__N_110ThreadPool4LoopEPv
   fun:_ZL12thread_startPv
   fun:start_thread
   fun:clone
}

Powered by Google App Engine
This is Rietveld 408576698