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

Side by Side Diff: tests/GrPorterDuffTest.cpp

Issue 1187523005: Add support for creating texture backed images where Skia will delete the texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add default param to support Chrome's current callers Created 5 years, 6 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/image/SkSurface_Gpu.cpp ('k') | tests/GrSurfaceTest.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 2015 Google Inc. 2 * Copyright 2015 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 #include "SkXfermode.h" 8 #include "SkXfermode.h"
9 #include "Test.h" 9 #include "Test.h"
10 10
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 const GrCaps& caps = *ctx->caps(); 959 const GrCaps& caps = *ctx->caps();
960 if (caps.shaderCaps()->dualSourceBlendingSupport()) { 960 if (caps.shaderCaps()->dualSourceBlendingSupport()) {
961 SkFAIL("Null context failed to honor request for no ARB_blend_func_exten ded."); 961 SkFAIL("Null context failed to honor request for no ARB_blend_func_exten ded.");
962 return; 962 return;
963 } 963 }
964 964
965 GrBackendTextureDesc fakeDesc; 965 GrBackendTextureDesc fakeDesc;
966 fakeDesc.fConfig = kRGBA_8888_GrPixelConfig; 966 fakeDesc.fConfig = kRGBA_8888_GrPixelConfig;
967 fakeDesc.fWidth = fakeDesc.fHeight = 100; 967 fakeDesc.fWidth = fakeDesc.fHeight = 100;
968 fakeDesc.fTextureHandle = 1; 968 fakeDesc.fTextureHandle = 1;
969 SkAutoTUnref<GrTexture> fakeTexture(ctx->resourceProvider()->wrapBackendText ure(fakeDesc)); 969 SkAutoTUnref<GrTexture> fakeTexture(ctx->resourceProvider()->wrapBackendText ure(fakeDesc,
970 kBorrow_GrWrapOwnership));
970 GrXferProcessor::DstTexture fakeDstTexture; 971 GrXferProcessor::DstTexture fakeDstTexture;
971 fakeDstTexture.setTexture(fakeTexture); 972 fakeDstTexture.setTexture(fakeTexture);
972 973
973 static const GrColor testColors[] = { 974 static const GrColor testColors[] = {
974 0, 975 0,
975 GrColorPackRGBA(0, 82, 0, 255), 976 GrColorPackRGBA(0, 82, 0, 255),
976 GrColorPackA4(255) 977 GrColorPackA4(255)
977 }; 978 };
978 static const GrColorComponentFlags testColorFlags[] = { 979 static const GrColorComponentFlags testColorFlags[] = {
979 kNone_GrColorComponentFlags, 980 kNone_GrColorComponentFlags,
(...skipping 27 matching lines...) Expand all
1007 TEST_ASSERT(!xp->hasSecondaryOutput()); 1008 TEST_ASSERT(!xp->hasSecondaryOutput());
1008 xp->getOptimizations(colorPOI, covPOI, false, 0, caps); 1009 xp->getOptimizations(colorPOI, covPOI, false, 0, caps);
1009 TEST_ASSERT(!xp->hasSecondaryOutput()); 1010 TEST_ASSERT(!xp->hasSecondaryOutput());
1010 } 1011 }
1011 } 1012 }
1012 } 1013 }
1013 } 1014 }
1014 1015
1015 #endif 1016 #endif
1016 1017
OLDNEW
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | tests/GrSurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698