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

Side by Side Diff: tests/PipeTest.cpp

Issue 145313004: Cleanup: Sanitize the order of includes under tests/ (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more two fixes Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/PictureUtilsTest.cpp ('k') | tests/PixelRefTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Test.h"
9 #include "SamplePipeControllers.h" 8 #include "SamplePipeControllers.h"
10 #include "SkBitmap.h" 9 #include "SkBitmap.h"
11 #include "SkCanvas.h" 10 #include "SkCanvas.h"
12 #include "SkGPipe.h" 11 #include "SkGPipe.h"
13 #include "SkPaint.h" 12 #include "SkPaint.h"
14 #include "SkShader.h" 13 #include "SkShader.h"
14 #include "Test.h"
15 15
16 // Ensures that the pipe gracefully handles drawing an invalid bitmap. 16 // Ensures that the pipe gracefully handles drawing an invalid bitmap.
17 static void testDrawingBadBitmap(SkCanvas* pipeCanvas) { 17 static void testDrawingBadBitmap(SkCanvas* pipeCanvas) {
18 SkBitmap badBitmap; 18 SkBitmap badBitmap;
19 badBitmap.setConfig(SkBitmap::kNo_Config, 5, 5); 19 badBitmap.setConfig(SkBitmap::kNo_Config, 5, 5);
20 pipeCanvas->drawBitmap(badBitmap, 0, 0); 20 pipeCanvas->drawBitmap(badBitmap, 0, 0);
21 } 21 }
22 22
23 // Ensure that pipe gracefully handles attempting to draw after endRecording is called on the 23 // Ensure that pipe gracefully handles attempting to draw after endRecording is called on the
24 // SkGPipeWriter. 24 // SkGPipeWriter.
(...skipping 23 matching lines...) Expand all
48 SkCanvas canvas(bitmap); 48 SkCanvas canvas(bitmap);
49 49
50 PipeController pipeController(&canvas); 50 PipeController pipeController(&canvas);
51 SkGPipeWriter writer; 51 SkGPipeWriter writer;
52 SkCanvas* pipeCanvas = writer.startRecording(&pipeController); 52 SkCanvas* pipeCanvas = writer.startRecording(&pipeController);
53 testDrawingBadBitmap(pipeCanvas); 53 testDrawingBadBitmap(pipeCanvas);
54 writer.endRecording(); 54 writer.endRecording();
55 55
56 testDrawingAfterEndRecording(&canvas); 56 testDrawingAfterEndRecording(&canvas);
57 } 57 }
OLDNEW
« no previous file with comments | « tests/PictureUtilsTest.cpp ('k') | tests/PixelRefTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698