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

Side by Side Diff: tests/SurfaceTest.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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 | « tests/SkpSkGrTest.cpp ('k') | tests/SwizzlerTest.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 2013 Google Inc. 2 * Copyright 2013 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 public: 79 public:
80 EmptyGenerator() : SkImageGenerator(SkImageInfo::MakeN32Premul(0, 0)) {} 80 EmptyGenerator() : SkImageGenerator(SkImageInfo::MakeN32Premul(0, 0)) {}
81 }; 81 };
82 82
83 static void test_empty_image(skiatest::Reporter* reporter) { 83 static void test_empty_image(skiatest::Reporter* reporter) {
84 const SkImageInfo info = SkImageInfo::Make(0, 0, kN32_SkColorType, kPremul_S kAlphaType); 84 const SkImageInfo info = SkImageInfo::Make(0, 0, kN32_SkColorType, kPremul_S kAlphaType);
85 85
86 REPORTER_ASSERT(reporter, NULL == SkImage::NewRasterCopy(info, NULL, 0)); 86 REPORTER_ASSERT(reporter, NULL == SkImage::NewRasterCopy(info, NULL, 0));
87 REPORTER_ASSERT(reporter, NULL == SkImage::NewRasterData(info, NULL, 0)); 87 REPORTER_ASSERT(reporter, NULL == SkImage::NewRasterData(info, NULL, 0));
88 REPORTER_ASSERT(reporter, NULL == SkImage::NewFromRaster(info, NULL, 0, NULL , NULL)); 88 REPORTER_ASSERT(reporter, NULL == SkImage::NewFromRaster(info, NULL, 0, NULL , NULL));
89 REPORTER_ASSERT(reporter, NULL == SkImage::NewFromGenerator(SkNEW(EmptyGener ator))); 89 REPORTER_ASSERT(reporter, NULL == SkImage::NewFromGenerator(new EmptyGenerat or));
90 } 90 }
91 91
92 static void test_empty_surface(skiatest::Reporter* reporter, GrContext* ctx) { 92 static void test_empty_surface(skiatest::Reporter* reporter, GrContext* ctx) {
93 const SkImageInfo info = SkImageInfo::Make(0, 0, kN32_SkColorType, kPremul_S kAlphaType); 93 const SkImageInfo info = SkImageInfo::Make(0, 0, kN32_SkColorType, kPremul_S kAlphaType);
94 94
95 REPORTER_ASSERT(reporter, NULL == SkSurface::NewRaster(info)); 95 REPORTER_ASSERT(reporter, NULL == SkSurface::NewRaster(info));
96 REPORTER_ASSERT(reporter, NULL == SkSurface::NewRasterDirect(info, NULL, 0)) ; 96 REPORTER_ASSERT(reporter, NULL == SkSurface::NewRasterDirect(info, NULL, 0)) ;
97 if (ctx) { 97 if (ctx) {
98 REPORTER_ASSERT(reporter, NULL == 98 REPORTER_ASSERT(reporter, NULL ==
99 SkSurface::NewRenderTarget(ctx, SkSurface::kNo_Budgeted, info, 0, NULL)); 99 SkSurface::NewRenderTarget(ctx, SkSurface::kNo_Budgeted, info, 0, NULL));
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 test_image_color(reporter, refImg, expected1); 1022 test_image_color(reporter, refImg, expected1);
1023 #endif 1023 #endif
1024 test_image_color(reporter, cpyImg, expected0); 1024 test_image_color(reporter, cpyImg, expected0);
1025 1025
1026 // Now exercise the release proc 1026 // Now exercise the release proc
1027 REPORTER_ASSERT(reporter, !releaseCtx.fIsReleased); 1027 REPORTER_ASSERT(reporter, !releaseCtx.fIsReleased);
1028 refImg.reset(NULL); // force a release of the image 1028 refImg.reset(NULL); // force a release of the image
1029 REPORTER_ASSERT(reporter, releaseCtx.fIsReleased); 1029 REPORTER_ASSERT(reporter, releaseCtx.fIsReleased);
1030 } 1030 }
1031 #endif 1031 #endif
OLDNEW
« no previous file with comments | « tests/SkpSkGrTest.cpp ('k') | tests/SwizzlerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698