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>
This commit is contained in:
Mike Klein 2017-03-27 14:28:07 -04:00 committed by Skia Commit-Bot
parent b436655ad5
commit b338484d23
5 changed files with 13 additions and 41 deletions

View File

@ -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;
}

View File

@ -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) {

View File

@ -802,27 +802,6 @@ DEF_TEST(PaintFilterCanvas_ConsistentState, reporter) {
///////////////////////////////////////////////////////////////////////////////////////////////////
#include "SkDeferredCanvas.h"
#include "SkDumpCanvas.h"
DEF_TEST(DeferredCanvas, r) {
SkDebugfDumper dumper;
SkDumpCanvas dumpC(&dumper);
SkDeferredCanvas canvas(&dumpC, SkDeferredCanvas::kEager);
SkPaint paint;
// paint.setShader(SkShader::MakeColorShader(SK_ColorRED));
canvas.save();
canvas.clipRect(SkRect::MakeWH(55, 55));
canvas.translate(10, 20);
canvas.drawRect(SkRect::MakeWH(50, 50), paint);
canvas.restore();
}
///////////////////////////////////////////////////////////////////////////////////////////////////
#include "SkCanvasStack.h"
#include "SkNWayCanvas.h"

View File

@ -87,6 +87,5 @@ DEF_TEST(Interpolator, reporter) {
SkUnitCubicInterp(val, t[0], t[1], t[2], t[3])));
}
++i;
SkDebugf("\n");
}
}

View File

@ -108,8 +108,6 @@ static void load_command_buffer_functions() {
gfCreateContext && gfDestroyContext && gfMakeCurrent &&
gfSwapBuffers && gfGetProcAddress;
} else {
SkDebugf("Could not load %s.\n", libName);
}
}
}
@ -159,8 +157,6 @@ CommandBufferGLTestContext::CommandBufferGLTestContext(CommandBufferGLTestContex
load_command_buffer_once();
if (!gfFunctionsLoadedSuccessfully) {
static SkOnce once;
once([] { SkDebugf("Command Buffer: Could not load EGL functions.\n"); });
return;
}