diff options
author | reed <reed@google.com> | 2016-01-08 06:30:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-08 06:30:14 -0800 |
commit | 7c554222ddd03d3817ab197a0bd92badc6f1f7c9 (patch) | |
tree | 4eabf4a0e232abd8e83281d343753d0b7c880609 /tests/PipeTest.cpp | |
parent | 57fa241d6f43557e4243a46f8b5a4ed447ccb8d2 (diff) |
remove SkGPipe
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568883003
Review URL: https://codereview.chromium.org/1568883003
Diffstat (limited to 'tests/PipeTest.cpp')
-rw-r--r-- | tests/PipeTest.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/tests/PipeTest.cpp b/tests/PipeTest.cpp deleted file mode 100644 index 00a1a3f201..0000000000 --- a/tests/PipeTest.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2012 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "SamplePipeControllers.h" -#include "SkBitmap.h" -#include "SkCanvas.h" -#include "SkGPipe.h" -#include "SkPaint.h" -#include "SkShader.h" -#include "Test.h" - -// Ensures that the pipe gracefully handles drawing an invalid bitmap. -static void testDrawingBadBitmap(SkCanvas* pipeCanvas) { - SkBitmap badBitmap; - badBitmap.setInfo(SkImageInfo::MakeUnknown(5, 5)); - pipeCanvas->drawBitmap(badBitmap, 0, 0); -} - -// Ensure that pipe gracefully handles attempting to draw after endRecording is called on the -// SkGPipeWriter. -static void testDrawingAfterEndRecording(SkCanvas* canvas) { - PipeController pc(canvas); - SkGPipeWriter writer; - SkCanvas* pipeCanvas = writer.startRecording(&pc, SkGPipeWriter::kCrossProcess_Flag); - writer.endRecording(); - - SkBitmap bm; - bm.allocN32Pixels(2, 2); - bm.eraseColor(SK_ColorTRANSPARENT); - - SkShader* shader = SkShader::CreateBitmapShader(bm, SkShader::kClamp_TileMode, - SkShader::kClamp_TileMode); - SkPaint paint; - paint.setShader(shader)->unref(); - pipeCanvas->drawPaint(paint); - - pipeCanvas->drawBitmap(bm, 0, 0); -} - -DEF_TEST(Pipe, reporter) { - SkBitmap bitmap; - bitmap.setInfo(SkImageInfo::MakeN32Premul(64, 64)); - SkCanvas canvas(bitmap); - - PipeController pipeController(&canvas); - SkGPipeWriter writer; - SkCanvas* pipeCanvas = writer.startRecording(&pipeController); - testDrawingBadBitmap(pipeCanvas); - writer.endRecording(); - - testDrawingAfterEndRecording(&canvas); -} |