From: joshualitt Date: Tue, 1 Mar 2016 22:22:02 +0000 (-0800) Subject: Change skiaserve color palette for drawing batch bounds X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~129^2~1714 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bdc6b2b1689d3c88d6821f8c2faa2ec7660b9fba;p=platform%2Fupstream%2FlibSkiaSharp.git Change skiaserve color palette for drawing batch bounds BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1756603002 Review URL: https://codereview.chromium.org/1756603002 --- diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp index 713ac39..dc529a4 100644 --- a/tools/debugger/SkDebugCanvas.cpp +++ b/tools/debugger/SkDebugCanvas.cpp @@ -331,6 +331,11 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index) { #if SK_SUPPORT_GPU // draw any batches if required and issue a full reset onto GrAuditTrail if (at) { + // we pick three colorblind-safe colors, 75% alpha + static const SkColor kTotalBounds = SkColorSetARGB(0xC0, 0x6A, 0x3D, 0x9A); + static const SkColor kOpBatchBounds = SkColorSetARGB(0xC0, 0xE3, 0x1A, 0x1C); + static const SkColor kOtherBatchBounds = SkColorSetARGB(0xC0, 0xFF, 0x7F, 0x00); + // get the render target of the top device so we can ignore batches drawn offscreen SkBaseDevice* bd = canvas->getDevice_just_for_deprecated_compatibility_testing(); SkGpuDevice* gbd = reinterpret_cast(bd); @@ -348,14 +353,14 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index) { // offscreen draw, ignore for now continue; } - paint.setColor(SK_ColorBLACK); + paint.setColor(kTotalBounds); canvas->drawRect(childrenBounds[i].fBounds, paint); for (int j = 0; j < childrenBounds[i].fBatches.count(); j++) { const GrAuditTrail::BatchInfo::Batch& batch = childrenBounds[i].fBatches[j]; if (batch.fClientID != index) { - paint.setColor(SK_ColorBLUE); + paint.setColor(kOtherBatchBounds); } else { - paint.setColor(SK_ColorRED); + paint.setColor(kOpBatchBounds); } canvas->drawRect(batch.fBounds, paint); }