diff options
author | 2015-11-22 08:45:13 -0800 | |
---|---|---|
committer | 2015-11-22 08:45:13 -0800 | |
commit | 08c4bdf305b75815cff209edcaa12b9e26690186 (patch) | |
tree | fc812500633f6f3b801800a3434ba0b31ba29c22 /src/gpu/batches/GrAADistanceFieldPathRenderer.h | |
parent | c64eff55049b1192052b791549a32a03be1c43e3 (diff) |
Revert of Add stroking support to distance field path renderer (patchset #8 id:160001 of https://codereview.chromium.org/1460873002/ )
Reason for revert:
Valgrind failures:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/420/steps/dm/logs/stdio
==7062== Use of uninitialised value of size 8
==7062== at 0x8ECA9A: AADistanceFieldPathBatch::onPrepareDraws(GrVertexBatch::Target*) (SkTDynamicHash.h:94)
==7062== by 0x90DCF5: GrVertexBatch::onPrepare(GrBatchFlushState*) (GrVertexBatch.cpp:16)
==7062== by 0x8B592A: GrDrawTarget::prepareBatches(GrBatchFlushState*) (GrBatch.h:100)
==7062== by 0x8B51EA: GrDrawingManager::flush() (GrDrawingManager.cpp:78)
==7062== by 0x8AE568: GrContext::flush(int) (GrContext.cpp:191)
==7062== by 0x6C118A: GrContext::getTestTarget(GrTestTarget*, GrRenderTarget*) (GrTest.cpp:56)
==7062== by 0x4F4D82: GrDrawingManager::ProgramUnitTest(GrContext*, int) (GLProgramsTest.cpp:360)
==7062== by 0x4F58EC: test_GLPrograms(skiatest::Reporter*, GrContextFactory*) (GLProgramsTest.cpp:450)
==7062== by 0x40925E: run_test(skiatest::Test*) (DM.cpp:1022)
==7062== by 0x40BAC2: run_enclave_and_gpu_tests(SkTArray<Task, false>*) (DM.cpp:1033)
==7062== by 0x7621A9: SkTaskGroup::wait() (SkTaskGroup.cpp:88)
==7062== by 0x40B756: dm_main() (DM.cpp:1124)
==7062== by 0x40BA5F: main (DM.cpp:1211)
==7062== Uninitialised value was created by a stack allocation
==7062== at 0x8DB484: GrTest::TestStrokeRec(SkRandom*) (GrTestUtils.cpp:232)
==7062==
{
<insert_a_suppression_name_here>
Memcheck:Value8
fun:_ZN24AADistanceFieldPathBatch14onPrepareDrawsEPN13GrVertexBatch6TargetE
fun:_ZN13GrVertexBatch9onPrepareEP17GrBatchFlushState
fun:_ZN12GrDrawTarget14prepareBatchesEP17GrBatchFlushState
fun:_ZN16GrDrawingManager5flushEv
fun:_ZN9GrContext5flushEi
fun:_ZN9GrContext13getTestTargetEP12GrTestTargetP14GrRenderTarget
fun:_ZN16GrDrawingManager15ProgramUnitTestEP9GrContexti
fun:_ZL15test_GLProgramsPN8skiatest8ReporterEP16GrContextFactory
fun:_ZL8run_testPN8skiatest4TestE
fun:_ZL25run_enclave_and_gpu_testsP8SkTArrayI4TaskLb0EE
fun:_ZN11SkTaskGroup4waitEv
fun:_Z7dm_mainv
fun:main
}
Original issue's description:
> Add stroking support to distance field path renderer
>
> Also slightly increases sizes of paths accepted for distance field
> caching.
>
> Committed: https://skia.googlesource.com/skia/+/5ce76efd1c847308c7bcac17bd87d567c42cd786
>
> Committed: https://skia.googlesource.com/skia/+/73ee6770260dbeeabc4a78eee4f13533f0031211
TBR=robertphillips@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1465053002
Diffstat (limited to 'src/gpu/batches/GrAADistanceFieldPathRenderer.h')
-rwxr-xr-x | src/gpu/batches/GrAADistanceFieldPathRenderer.h | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.h b/src/gpu/batches/GrAADistanceFieldPathRenderer.h index 1210cee331..469aeeb981 100755 --- a/src/gpu/batches/GrAADistanceFieldPathRenderer.h +++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.h @@ -33,28 +33,13 @@ private: bool onDrawPath(const DrawPathArgs&) override; struct PathData { - class Key { - public: - // default ctor needed for new of uninitialized PathData - // since fStroke has no default ctor - Key() : fStroke(SkStrokeRec::kFill_InitStyle) {} - Key(uint32_t genID, uint32_t dim, const SkStrokeRec& stroke) - : fGenID(genID) - , fDimension(dim) - , fStroke(stroke) { - } - - bool operator==(const Key& other) const { - return other.fGenID == fGenID && other.fDimension == fDimension && - fStroke.hasEqualEffect(other.fStroke); - } - - private: + struct Key { uint32_t fGenID; // rendered size for stored path (32x32 max, 64x64 max, 128x128 max) uint32_t fDimension; - // stroking information - SkStrokeRec fStroke; + bool operator==(const Key& other) const { + return other.fGenID == fGenID && other.fDimension == fDimension; + } }; Key fKey; SkScalar fScale; |