| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 here to ensure SK_SUPPORT_GPU is set correctly before it is examined. | 8 // Include here to ensure SK_SUPPORT_GPU is set correctly before it is examined. |
| 9 #include "SkTypes.h" | 9 #include "SkTypes.h" |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 REPORTER_ASSERT(reporter, | 149 REPORTER_ASSERT(reporter, |
| 150 smallMSAART0 && smallMSAART1 && | 150 smallMSAART0 && smallMSAART1 && |
| 151 smallMSAART0->asRenderTarget() && | 151 smallMSAART0->asRenderTarget() && |
| 152 smallMSAART1->asRenderTarget() && | 152 smallMSAART1->asRenderTarget() && |
| 153 smallMSAART0->asRenderTarget()->renderTargetPriv().getSt
encilAttachment() == | 153 smallMSAART0->asRenderTarget()->renderTargetPriv().getSt
encilAttachment() == |
| 154 smallMSAART1->asRenderTarget()->renderTargetPriv().getSt
encilAttachment()); | 154 smallMSAART1->asRenderTarget()->renderTargetPriv().getSt
encilAttachment()); |
| 155 // But not one with a larger sample count should not. (Also check that t
he request for 4 | 155 // But not one with a larger sample count should not. (Also check that t
he request for 4 |
| 156 // samples didn't get rounded up to >= 8 or else they could share.). | 156 // samples didn't get rounded up to >= 8 or else they could share.). |
| 157 if (context->caps()->maxSampleCount() >= 8 && | 157 if (context->caps()->maxSampleCount() >= 8 && |
| 158 smallMSAART0 && smallMSAART0->asRenderTarget() && | 158 smallMSAART0 && smallMSAART0->asRenderTarget() && |
| 159 smallMSAART0->asRenderTarget()->numSamples() < 8) { | 159 smallMSAART0->asRenderTarget()->numColorSamples() < 8) { |
| 160 smallMSAADesc.fSampleCnt = 8; | 160 smallMSAADesc.fSampleCnt = 8; |
| 161 smallMSAART1.reset(cache->createTexture(smallMSAADesc, false)); | 161 smallMSAART1.reset(cache->createTexture(smallMSAADesc, false)); |
| 162 SkAutoTUnref<GrTexture> smallMSAART1(cache->createTexture(smallMSAAD
esc, false)); | 162 SkAutoTUnref<GrTexture> smallMSAART1(cache->createTexture(smallMSAAD
esc, false)); |
| 163 if (smallMSAART1 && smallMSAART1->asRenderTarget()) { | 163 if (smallMSAART1 && smallMSAART1->asRenderTarget()) { |
| 164 smallMSAART1->asRenderTarget()->renderTargetPriv().attachStencil
Attachment(); | 164 smallMSAART1->asRenderTarget()->renderTargetPriv().attachStencil
Attachment(); |
| 165 } | 165 } |
| 166 REPORTER_ASSERT(reporter, | 166 REPORTER_ASSERT(reporter, |
| 167 smallMSAART0 && smallMSAART1 && | 167 smallMSAART0 && smallMSAART1 && |
| 168 smallMSAART0->asRenderTarget() && | 168 smallMSAART0->asRenderTarget() && |
| 169 smallMSAART1->asRenderTarget() && | 169 smallMSAART1->asRenderTarget() && |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 test_scratch_key_consistency(reporter); | 1206 test_scratch_key_consistency(reporter); |
| 1207 test_purge_invalidated(reporter); | 1207 test_purge_invalidated(reporter); |
| 1208 test_cache_chained_purge(reporter); | 1208 test_cache_chained_purge(reporter); |
| 1209 test_resource_size_changed(reporter); | 1209 test_resource_size_changed(reporter); |
| 1210 test_timestamp_wrap(reporter); | 1210 test_timestamp_wrap(reporter); |
| 1211 test_flush(reporter); | 1211 test_flush(reporter); |
| 1212 test_large_resource_count(reporter); | 1212 test_large_resource_count(reporter); |
| 1213 } | 1213 } |
| 1214 | 1214 |
| 1215 #endif | 1215 #endif |
| OLD | NEW |