Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(677)

Unified Diff: tests/PipeTest.cpp

Issue 1568883003: remove SkGPipe (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pipe/utils/SamplePipeControllers.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PipeTest.cpp
diff --git a/tests/PipeTest.cpp b/tests/PipeTest.cpp
deleted file mode 100644
index 00a1a3f201b39195199fbff329e6e1d70d3894f8..0000000000000000000000000000000000000000
--- 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);
-}
« no previous file with comments | « src/pipe/utils/SamplePipeControllers.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698