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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 GrContextOptions opts; | 942 GrContextOptions opts; |
943 opts.fSuppressDualSourceBlending = true; | 943 opts.fSuppressDualSourceBlending = true; |
944 GrContextFactory factory(opts); | 944 GrContextFactory factory(opts); |
945 factory.get(GrContextFactory::kNull_GLContextType); | 945 factory.get(GrContextFactory::kNull_GLContextType); |
946 GrContext* ctx = factory.get(GrContextFactory::kNull_GLContextType); | 946 GrContext* ctx = factory.get(GrContextFactory::kNull_GLContextType); |
947 if (!ctx) { | 947 if (!ctx) { |
948 SkFAIL("Failed to create null context without ARB_blend_func_extended.")
; | 948 SkFAIL("Failed to create null context without ARB_blend_func_extended.")
; |
949 return; | 949 return; |
950 } | 950 } |
951 | 951 |
952 const GrCaps& caps = *ctx->caps(); | 952 const GrCaps& caps = *ctx->getGpu()->caps(); |
953 if (caps.shaderCaps()->dualSourceBlendingSupport()) { | 953 if (caps.shaderCaps()->dualSourceBlendingSupport()) { |
954 SkFAIL("Null context failed to honor request for no ARB_blend_func_exten
ded."); | 954 SkFAIL("Null context failed to honor request for no ARB_blend_func_exten
ded."); |
955 return; | 955 return; |
956 } | 956 } |
957 | 957 |
958 GrBackendTextureDesc fakeDesc; | 958 GrBackendTextureDesc fakeDesc; |
959 fakeDesc.fConfig = kRGBA_8888_GrPixelConfig; | 959 fakeDesc.fConfig = kRGBA_8888_GrPixelConfig; |
960 fakeDesc.fWidth = fakeDesc.fHeight = 100; | 960 fakeDesc.fWidth = fakeDesc.fHeight = 100; |
961 fakeDesc.fTextureHandle = 1; | 961 fakeDesc.fTextureHandle = 1; |
962 SkAutoTUnref<GrTexture> fakeTexture(ctx->resourceProvider()->wrapBackendText
ure(fakeDesc)); | 962 SkAutoTUnref<GrTexture> fakeTexture(ctx->resourceProvider()->wrapBackendText
ure(fakeDesc)); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 TEST_ASSERT(!xp->hasSecondaryOutput()); | 1002 TEST_ASSERT(!xp->hasSecondaryOutput()); |
1003 xp->getOptimizations(colorPOI, covPOI, false, 0, caps); | 1003 xp->getOptimizations(colorPOI, covPOI, false, 0, caps); |
1004 TEST_ASSERT(!xp->hasSecondaryOutput()); | 1004 TEST_ASSERT(!xp->hasSecondaryOutput()); |
1005 } | 1005 } |
1006 } | 1006 } |
1007 } | 1007 } |
1008 } | 1008 } |
1009 | 1009 |
1010 #endif | 1010 #endif |
1011 | 1011 |
OLD | NEW |