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

Unified Diff: tests/ReadPixelsTest.cpp

Issue 1966013002: Turn ContextInfos returned by GrContextFactory into structs. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Address comment Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ProxyTest.cpp ('k') | tests/ReadWriteAlphaTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ReadPixelsTest.cpp
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp
index 9db507b981dcb8bdd5329a52f6ccd0e19ffcd7ab..28650e242708cc007994030b5dc73873cabef71d 100644
--- a/tests/ReadPixelsTest.cpp
+++ b/tests/ReadPixelsTest.cpp
@@ -396,7 +396,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Gpu, reporter, ctxInfo) {
desc.fConfig = kSkia8888_GrPixelConfig;
desc.fOrigin = origin;
SkAutoTUnref<GrTexture> surfaceTexture(
- ctxInfo.fGrContext->textureProvider()->createTexture(desc, SkBudgeted::kNo));
+ ctxInfo.grContext()->textureProvider()->createTexture(desc, SkBudgeted::kNo));
auto surface(SkSurface::MakeRenderTargetDirect(surfaceTexture->asRenderTarget()));
desc.fFlags = kNone_GrSurfaceFlags;
test_readpixels(reporter, surface, kLast_BitmapInit);
@@ -453,7 +453,8 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Texture, reporter, ctxInfo) {
desc.fConfig = kSkia8888_GrPixelConfig;
desc.fOrigin = origin;
desc.fFlags = kNone_GrSurfaceFlags;
- texture.reset(ctxInfo.fGrContext->textureProvider()->createTexture(desc, SkBudgeted::kNo));
+ texture.reset(ctxInfo.grContext()->textureProvider()->createTexture(desc,
+ SkBudgeted::kNo));
test_readpixels_texture(reporter, texture);
}
}
@@ -585,7 +586,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Subset_Gpu, reporter, ctxInfo)
SkBitmap bm_subset, tx_subset;
// ... one from a texture-subset
- SkAutoTUnref<GrTexture> fullTx(GrRefCachedBitmapTexture(ctxInfo.fGrContext, bitmap,
+ SkAutoTUnref<GrTexture> fullTx(GrRefCachedBitmapTexture(ctxInfo.grContext(), bitmap,
GrTextureParams::ClampNoFilter()));
SkBitmap tx_full;
GrWrapTextureInBitmap(fullTx, bitmap.width(), bitmap.height(), true, &tx_full);
@@ -594,7 +595,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Subset_Gpu, reporter, ctxInfo)
// ... one from a bitmap-subset
SkBitmap tmp_subset;
bitmap.extractSubset(&tmp_subset, subset);
- SkAutoTUnref<GrTexture> subsetTx(GrRefCachedBitmapTexture(ctxInfo.fGrContext, tmp_subset,
+ SkAutoTUnref<GrTexture> subsetTx(GrRefCachedBitmapTexture(ctxInfo.grContext(), tmp_subset,
GrTextureParams::ClampNoFilter()));
GrWrapTextureInBitmap(subsetTx, tmp_subset.width(), tmp_subset.height(), true, &bm_subset);
@@ -603,8 +604,8 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Subset_Gpu, reporter, ctxInfo)
// do they draw the same?
const SkImageInfo info = SkImageInfo::MakeN32Premul(128, 128);
- auto surfA(SkSurface::MakeRenderTarget(ctxInfo.fGrContext, SkBudgeted::kNo, info));
- auto surfB(SkSurface::MakeRenderTarget(ctxInfo.fGrContext, SkBudgeted::kNo, info));
+ auto surfA(SkSurface::MakeRenderTarget(ctxInfo.grContext(), SkBudgeted::kNo, info));
+ auto surfB(SkSurface::MakeRenderTarget(ctxInfo.grContext(), SkBudgeted::kNo, info));
if (false) {
//
« no previous file with comments | « tests/ProxyTest.cpp ('k') | tests/ReadWriteAlphaTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698