OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |