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

Side by Side Diff: tests/PictureShaderTest.cpp

Issue 437393003: Explicit tile bounds for SkPictureShader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebased. Created 6 years, 4 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
« no previous file with comments | « src/core/SkShader.cpp ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "SkPicture.h" 8 #include "SkPicture.h"
9 #include "SkPictureRecorder.h" 9 #include "SkPictureRecorder.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
11 #include "Test.h" 11 #include "Test.h"
12 12
13 // Test that attempting to create a picture shader with a NULL picture or 13 // Test that attempting to create a picture shader with a NULL picture or
14 // empty picture returns NULL. 14 // empty picture returns NULL.
15 DEF_TEST(PictureShader_empty, reporter) { 15 DEF_TEST(PictureShader_empty, reporter) {
16 SkShader* shader = SkShader::CreatePictureShader(NULL, 16 SkShader* shader = SkShader::CreatePictureShader(NULL,
17 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); 17 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, NULL, NULL);
18 REPORTER_ASSERT(reporter, NULL == shader); 18 REPORTER_ASSERT(reporter, NULL == shader);
19 19
20 SkPictureRecorder factory; 20 SkPictureRecorder factory;
21 factory.beginRecording(0, 0, NULL, 0); 21 factory.beginRecording(0, 0, NULL, 0);
22 SkAutoTUnref<SkPicture> picture(factory.endRecording()); 22 SkAutoTUnref<SkPicture> picture(factory.endRecording());
23 shader = SkShader::CreatePictureShader(picture.get(), 23 shader = SkShader::CreatePictureShader(picture.get(),
24 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); 24 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, NULL, NULL);
25 REPORTER_ASSERT(reporter, NULL == shader); 25 REPORTER_ASSERT(reporter, NULL == shader);
26 } 26 }
OLDNEW
« no previous file with comments | « src/core/SkShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698