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

Unified Diff: tests/ClearTest.cpp

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | tests/SRGBMipMapTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ClearTest.cpp
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp
index d83fb92b53d3f5b99c586e0a75ca6157a088aaae..999dde7abc38dc0d7bd998f20bcbaf6b402ba9c5 100644
--- a/tests/ClearTest.cpp
+++ b/tests/ClearTest.cpp
@@ -17,12 +17,12 @@
static bool check_rect(GrRenderTargetContext* rtc, const SkIRect& rect, uint32_t expectedValue,
uint32_t* actualValue, int* failX, int* failY) {
- GrRenderTarget* rt = rtc->accessRenderTarget();
int w = rect.width();
int h = rect.height();
std::unique_ptr<uint32_t[]> pixels(new uint32_t[w * h]);
memset(pixels.get(), ~expectedValue, sizeof(uint32_t) * w * h);
- rt->readPixels(rect.fLeft, rect.fTop, w, h, kRGBA_8888_GrPixelConfig, pixels.get());
+ SkImageInfo ii = SkImageInfo::MakeN32Premul(w, h);
+ rtc->readPixels(ii, pixels.get(), 0, rect.fLeft, rect.fTop);
for (int y = 0; y < h; ++y) {
for (int x = 0; x < w; ++x) {
uint32_t pixel = pixels.get()[y * w + x];
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | tests/SRGBMipMapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698