Lines Matching refs:rectangleTexture
17 GrTexture* rectangleTexture, uint32_t expectedPixelValues[]) { in test_read_pixels() argument
18 int pixelCnt = rectangleTexture->width() * rectangleTexture->height(); in test_read_pixels()
21 bool read = rectangleTexture->readPixels(0, 0, rectangleTexture->width(), in test_read_pixels()
22 rectangleTexture->height(), kRGBA_8888_GrPixelConfig, in test_read_pixels()
37 GrTexture* rectangleTexture) { in test_write_pixels() argument
38 int pixelCnt = rectangleTexture->width() * rectangleTexture->height(); in test_write_pixels()
40 for (int y = 0; y < rectangleTexture->width(); ++y) { in test_write_pixels()
41 for (int x = 0; x < rectangleTexture->height(); ++x) { in test_write_pixels()
42 pixels.get()[y * rectangleTexture->width() + x] = GrColorPackRGBA(x, y, x + y, x * y); in test_write_pixels()
45 bool write = rectangleTexture->writePixels(0, 0, rectangleTexture->width(), in test_write_pixels()
46 rectangleTexture->height(), kRGBA_8888_GrPixelConfig, in test_write_pixels()
51 test_read_pixels(reporter, context, rectangleTexture, pixels.get()); in test_write_pixels()
55 GrTexture* rectangleTexture, uint32_t expectedPixelValues[]) { in test_copy_surface_src() argument
58 copyDstDesc.fWidth = rectangleTexture->width(); in test_copy_surface_src()
59 copyDstDesc.fHeight = rectangleTexture->height(); in test_copy_surface_src()
63 context->copySurface(dst, rectangleTexture); in test_copy_surface_src()
68 GrTexture* rectangleTexture) { in test_copy_surface_dst() argument
69 int pixelCnt = rectangleTexture->width() * rectangleTexture->height(); in test_copy_surface_dst()
71 for (int y = 0; y < rectangleTexture->width(); ++y) { in test_copy_surface_dst()
72 for (int x = 0; x < rectangleTexture->height(); ++x) { in test_copy_surface_dst()
73 pixels.get()[y * rectangleTexture->width() + x] = GrColorPackRGBA(y, x, x * y, x *+ y); in test_copy_surface_dst()
79 copySrcDesc.fWidth = rectangleTexture->width(); in test_copy_surface_dst()
80 copySrcDesc.fHeight = rectangleTexture->height(); in test_copy_surface_dst()
85 context->copySurface(rectangleTexture, src); in test_copy_surface_dst()
86 test_read_pixels(reporter, context, rectangleTexture, pixels.get()); in test_copy_surface_dst()
90 GrTexture* rectangleTexture) { in test_clear() argument
91 if (rectangleTexture->asRenderTarget()) { in test_clear()
92 SkAutoTUnref<GrDrawContext> dc(context->drawContext(rectangleTexture->asRenderTarget())); in test_clear()
102 int w = rectangleTexture->width(); in test_clear()
103 int h = rectangleTexture->height(); in test_clear()
114 for (int i = 0; i < rectangleTexture->width() * rectangleTexture->height(); ++i) { in test_clear()
136 test_read_pixels(reporter, context, rectangleTexture, expectedPixels.get()); in test_clear()
185 SkAutoTUnref<GrTexture> rectangleTexture( in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
187 if (!rectangleTexture) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
193 test_read_pixels(reporter, context, rectangleTexture, refPixels); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
195 test_copy_surface_src(reporter, context, rectangleTexture, refPixels); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
197 test_copy_surface_dst(reporter, context, rectangleTexture); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
199 test_write_pixels(reporter, context, rectangleTexture); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
201 test_clear(reporter, context, rectangleTexture); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()