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

Side by Side Diff: cc/resources/resource_provider.cc

Issue 2713553005: Add GL_EXT_color_buffer_half_float support (Closed)
Patch Set: Add WebGL, cleanup Created 3 years, 10 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
OLDNEW
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
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 && caps.color_buffer_half_float;
551 } 551 }
552 552
553 NOTREACHED(); 553 NOTREACHED();
554 return false; 554 return false;
555 } 555 }
556 556
557 bool ResourceProvider::InUseByConsumer(ResourceId id) { 557 bool ResourceProvider::InUseByConsumer(ResourceId id) {
558 Resource* resource = GetResource(id); 558 Resource* resource = GetResource(id);
559 return resource->lock_for_read_count > 0 || resource->exported_count > 0 || 559 return resource->lock_for_read_count > 0 || resource->exported_count > 0 ||
560 resource->lost; 560 resource->lost;
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 2174
2175 const int kImportance = 2; 2175 const int kImportance = 2;
2176 pmd->CreateSharedGlobalAllocatorDump(guid); 2176 pmd->CreateSharedGlobalAllocatorDump(guid);
2177 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance); 2177 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance);
2178 } 2178 }
2179 2179
2180 return true; 2180 return true;
2181 } 2181 }
2182 2182
2183 } // namespace cc 2183 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/common/capabilities.h » ('j') | gpu/command_buffer/service/context_group.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698