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

Side by Side Diff: tests/FloatingPointTextureTest.cpp

Issue 648863002: Devirtualize read/write pixels on surface. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: simplify return Created 6 years, 2 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/gpu/effects/GrTextureStripAtlas.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 /* 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 SkAutoTUnref<GrTexture> fpTexture(context->createUncachedTexture(des c, 61 SkAutoTUnref<GrTexture> fpTexture(context->createUncachedTexture(des c,
62 NUL L, 62 NUL L,
63 0)) ; 63 0)) ;
64 64
65 // Floating point textures are NOT supported everywhere 65 // Floating point textures are NOT supported everywhere
66 if (NULL == fpTexture) { 66 if (NULL == fpTexture) {
67 continue; 67 continue;
68 } 68 }
69 69
70 // write square 70 // write square
71 context->writeTexturePixels(fpTexture, 0, 0, DEV_W, DEV_H, desc.fCon fig, 71 fpTexture->writePixels(0, 0, DEV_W, DEV_H, desc.fConfig, controlPixe lData, 0);
72 controlPixelData, 0); 72 fpTexture->readPixels(0, 0, DEV_W, DEV_H, desc.fConfig, readBuffer, 0);
73 context->readTexturePixels(fpTexture, 0, 0, DEV_W, DEV_H, desc.fConf ig, readBuffer, 0);
74 for (int j = 0; j < FP_CONTROL_ARRAY_SIZE; ++j) { 73 for (int j = 0; j < FP_CONTROL_ARRAY_SIZE; ++j) {
75 REPORTER_ASSERT(reporter, readBuffer[j] == controlPixelData[j]); 74 REPORTER_ASSERT(reporter, readBuffer[j] == controlPixelData[j]);
76 } 75 }
77 } 76 }
78 } 77 }
79 } 78 }
80 79
81 #endif 80 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureStripAtlas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698