| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/resources/resource_provider.h" | 5 #include "cc/resources/resource_provider.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 case ETC1: | 540 case ETC1: |
| 541 return caps.texture_format_etc1; | 541 return caps.texture_format_etc1; |
| 542 case RED_8: | 542 case RED_8: |
| 543 return caps.texture_rg; | 543 return caps.texture_rg; |
| 544 case LUMINANCE_F16: | 544 case LUMINANCE_F16: |
| 545 return caps.texture_half_float_linear; | 545 return caps.texture_half_float_linear; |
| 546 case RGBA_F16: | 546 case RGBA_F16: |
| 547 // TODO(ccameron): This will always return false on pixel tests, which | 547 // TODO(ccameron): This will always return false on pixel tests, which |
| 548 // makes it un-test-able until we upgrade Mesa. | 548 // makes it un-test-able until we upgrade Mesa. |
| 549 // https://crbug.com/687720 | 549 // https://crbug.com/687720 |
| 550 return caps.texture_half_float_linear && caps.color_buffer_float; | 550 return caps.texture_half_float_linear && |
| 551 caps.color_buffer_half_float_rgba; |
| 551 } | 552 } |
| 552 | 553 |
| 553 NOTREACHED(); | 554 NOTREACHED(); |
| 554 return false; | 555 return false; |
| 555 } | 556 } |
| 556 | 557 |
| 557 bool ResourceProvider::InUseByConsumer(ResourceId id) { | 558 bool ResourceProvider::InUseByConsumer(ResourceId id) { |
| 558 Resource* resource = GetResource(id); | 559 Resource* resource = GetResource(id); |
| 559 return resource->lock_for_read_count > 0 || resource->exported_count > 0 || | 560 return resource->lock_for_read_count > 0 || resource->exported_count > 0 || |
| 560 resource->lost; | 561 resource->lost; |
| (...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2172 | 2173 |
| 2173 const int kImportance = 2; | 2174 const int kImportance = 2; |
| 2174 pmd->CreateSharedGlobalAllocatorDump(guid); | 2175 pmd->CreateSharedGlobalAllocatorDump(guid); |
| 2175 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance); | 2176 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance); |
| 2176 } | 2177 } |
| 2177 | 2178 |
| 2178 return true; | 2179 return true; |
| 2179 } | 2180 } |
| 2180 | 2181 |
| 2181 } // namespace cc | 2182 } // namespace cc |
| OLD | NEW |