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

Side by Side Diff: tests/FloatingPointTextureTest.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 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/DynamicHashTest.cpp ('k') | tests/FontHostStreamTest.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 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 /* 8 /*
9 * This is a straightforward test of floating point textures, which are 9 * This is a straightforward test of floating point textures, which are
10 * supported on some platforms. As of right now, this test only supports 10 * supported on some platforms. As of right now, this test only supports
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 desc.fConfig = config; 48 desc.fConfig = config;
49 desc.fOrigin = 0 == origin ? 49 desc.fOrigin = 0 == origin ?
50 kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin; 50 kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin;
51 51
52 GrContextFactory::GLContextType type = 52 GrContextFactory::GLContextType type =
53 static_cast<GrContextFactory::GLContextType>(glCtxType); 53 static_cast<GrContextFactory::GLContextType>(glCtxType);
54 if (!GrContextFactory::IsRenderingGLContext(type)) { 54 if (!GrContextFactory::IsRenderingGLContext(type)) {
55 continue; 55 continue;
56 } 56 }
57 GrContext* context = factory->get(type); 57 GrContext* context = factory->get(type);
58 if (NULL == context) { 58 if (nullptr == context) {
59 continue; 59 continue;
60 } 60 }
61 61
62 SkAutoTUnref<GrTexture> fpTexture(context->textureProvider()->create Texture( 62 SkAutoTUnref<GrTexture> fpTexture(context->textureProvider()->create Texture(
63 desc, false, controlPixelData.begin(), 0)); 63 desc, false, controlPixelData.begin(), 0));
64 // Floating point textures are NOT supported everywhere 64 // Floating point textures are NOT supported everywhere
65 if (NULL == fpTexture) { 65 if (nullptr == fpTexture) {
66 continue; 66 continue;
67 } 67 }
68 fpTexture->readPixels(0, 0, DEV_W, DEV_H, desc.fConfig, readBuffer.b egin(), 0); 68 fpTexture->readPixels(0, 0, DEV_W, DEV_H, desc.fConfig, readBuffer.b egin(), 0);
69 REPORTER_ASSERT(reporter, 69 REPORTER_ASSERT(reporter,
70 0 == memcmp(readBuffer.begin(), controlPixelData.begin(), readBu ffer.bytes())); 70 0 == memcmp(readBuffer.begin(), controlPixelData.begin(), readBu ffer.bytes()));
71 } 71 }
72 } 72 }
73 } 73 }
74 74
75 static const int FP_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4/*RGBA*/; 75 static const int FP_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4/*RGBA*/;
(...skipping 16 matching lines...) Expand all
92 92
93 static const int HALF_RGBA_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4 /*RGBA*/; 93 static const int HALF_RGBA_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4 /*RGBA*/;
94 94
95 DEF_GPUTEST(HalfFloatRGBATextureTest, reporter, factory) { 95 DEF_GPUTEST(HalfFloatRGBATextureTest, reporter, factory) {
96 runFPTest<SkHalf>(reporter, factory, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon, 96 runFPTest<SkHalf>(reporter, factory, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon,
97 kMaxIntegerRepresentableInHalfFloatingPoint, 97 kMaxIntegerRepresentableInHalfFloatingPoint,
98 HALF_RGBA_CONTROL_ARRAY_SIZE, kRGBA_half_GrPixelConfig); 98 HALF_RGBA_CONTROL_ARRAY_SIZE, kRGBA_half_GrPixelConfig);
99 } 99 }
100 100
101 #endif 101 #endif
OLDNEW
« no previous file with comments | « tests/DynamicHashTest.cpp ('k') | tests/FontHostStreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698