diff options
author | Mike Klein <mtklein@chromium.org> | 2017-03-27 14:28:07 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-27 19:16:59 +0000 |
commit | b338484d23d6fa4d6726361440962e75ec5855e0 (patch) | |
tree | 77baa4b18ff2bcfb7306eed8dff56eb5c7c7329d /src | |
parent | b436655ad5c40a04b65c1642d0a0e781ce296c96 (diff) |
quiet some annoying logging in unit tests
Noticed all these while adding some unit test support to ok.
Change-Id: Ie33b96da95840628657211cb28b2134fd314a48a
Reviewed-on: https://skia-review.googlesource.com/10202
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pipe/SkPipeCanvas.cpp | 22 | ||||
-rw-r--r-- | src/ports/SkOSLibrary_posix.cpp | 6 |
2 files changed, 13 insertions, 15 deletions
diff --git a/src/pipe/SkPipeCanvas.cpp b/src/pipe/SkPipeCanvas.cpp index b05a643cb8..1473b843f6 100644 --- a/src/pipe/SkPipeCanvas.cpp +++ b/src/pipe/SkPipeCanvas.cpp @@ -240,7 +240,7 @@ SkCanvas::SaveLayerStrategy SkPipeCanvas::getSaveLayerStrategy(const SaveLayerRe if (rec.fBackdrop) { extra |= kHasBackdrop_SaveLayerMask; } - + writer.write32(pack_verb(SkPipeVerb::kSaveLayer, extra)); if (rec.fBounds) { writer.writeRect(*rec.fBounds); @@ -480,7 +480,7 @@ void SkPipeCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& la } /////////////////////////////////////////////////////////////////////////////////////////////////// - + void SkPipeCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top, const SkPaint* paint) { unsigned extra = 0; @@ -604,9 +604,9 @@ void SkPipeCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S void SkPipeCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], const SkPaint& paint) { SkASSERT(byteLength); - + bool compact = fits_in(byteLength, 24); - + SkPipeWriter writer(this); writer.write32(pack_verb(SkPipeVerb::kDrawPosText, compact ? (unsigned)byteLength : 0)); if (!compact) { @@ -620,9 +620,9 @@ void SkPipeCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPo void SkPipeCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], SkScalar constY, const SkPaint& paint) { SkASSERT(byteLength); - + bool compact = fits_in(byteLength, 24); - + SkPipeWriter writer(this); writer.write32(pack_verb(SkPipeVerb::kDrawPosTextH, compact ? (unsigned)byteLength : 0)); if (!compact) { @@ -661,13 +661,13 @@ void SkPipeCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const S void SkPipeCanvas::onDrawTextRSXform(const void* text, size_t byteLength, const SkRSXform xform[], const SkRect* cull, const SkPaint& paint) { SkASSERT(byteLength); - + bool compact = fits_in(byteLength, 23); unsigned extra = compact ? (byteLength << 1) : 0; if (cull) { extra |= 1; } - + SkPipeWriter writer(this); writer.write32(pack_verb(SkPipeVerb::kDrawTextRSXform, extra)); if (!compact) { @@ -878,8 +878,10 @@ int SkPipeDeduper::findOrDefinePicture(SkPicture* picture) { ASSERT_FITS_IN(index, kObjectDefinitionBits); fStream->write32(pack_verb(SkPipeVerb::kEndPicture, index)); - SkDebugf(" definePicture(%d) %d\n", - index - 1, SkToU32(fStream->bytesWritten() - prevWritten)); + if (show_deduper_traffic) { + SkDebugf(" definePicture(%d) %d\n", + index - 1, SkToU32(fStream->bytesWritten() - prevWritten)); + } return index; } diff --git a/src/ports/SkOSLibrary_posix.cpp b/src/ports/SkOSLibrary_posix.cpp index 6372a8122a..901ee22f3c 100644 --- a/src/ports/SkOSLibrary_posix.cpp +++ b/src/ports/SkOSLibrary_posix.cpp @@ -12,11 +12,7 @@ #include <dlfcn.h> void* DynamicLoadLibrary(const char* libraryName) { - void* result = dlopen(libraryName, RTLD_LAZY); - if (!result) { - SkDebugf("Error loading %s {\n %s\n}\n", libraryName, dlerror()); - } - return result; + return dlopen(libraryName, RTLD_LAZY); } void* GetProcedureAddress(void* library, const char* functionName) { |