| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 442 |
| 443 DCHECK(IsGpuResourceType(default_resource_type_)); | 443 DCHECK(IsGpuResourceType(default_resource_type_)); |
| 444 use_texture_storage_ext_ = caps.texture_storage; | 444 use_texture_storage_ext_ = caps.texture_storage; |
| 445 use_texture_format_bgra_ = caps.texture_format_bgra8888; | 445 use_texture_format_bgra_ = caps.texture_format_bgra8888; |
| 446 use_texture_usage_hint_ = caps.texture_usage; | 446 use_texture_usage_hint_ = caps.texture_usage; |
| 447 use_compressed_texture_etc1_ = caps.texture_format_etc1; | 447 use_compressed_texture_etc1_ = caps.texture_format_etc1; |
| 448 yuv_resource_format_ = caps.texture_rg ? RED_8 : LUMINANCE_8; | 448 yuv_resource_format_ = caps.texture_rg ? RED_8 : LUMINANCE_8; |
| 449 yuv_highbit_resource_format_ = yuv_resource_format_; | 449 yuv_highbit_resource_format_ = yuv_resource_format_; |
| 450 if (caps.texture_half_float_linear) | 450 if (caps.texture_half_float_linear) |
| 451 yuv_highbit_resource_format_ = LUMINANCE_F16; | 451 yuv_highbit_resource_format_ = LUMINANCE_F16; |
| 452 if (caps.force_software_yuv_conversion) |
| 453 yuv_resource_format_ = yuv_highbit_resource_format_ = RGBA_8888; |
| 452 use_sync_query_ = caps.sync_query; | 454 use_sync_query_ = caps.sync_query; |
| 453 | 455 |
| 454 GLES2Interface* gl = ContextGL(); | 456 GLES2Interface* gl = ContextGL(); |
| 455 | 457 |
| 456 max_texture_size_ = 0; // Context expects cleared value. | 458 max_texture_size_ = 0; // Context expects cleared value. |
| 457 gl->GetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size_); | 459 gl->GetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size_); |
| 458 best_texture_format_ = | 460 best_texture_format_ = |
| 459 PlatformColor::BestSupportedTextureFormat(use_texture_format_bgra_); | 461 PlatformColor::BestSupportedTextureFormat(use_texture_format_bgra_); |
| 460 | 462 |
| 461 best_render_buffer_format_ = PlatformColor::BestSupportedTextureFormat( | 463 best_render_buffer_format_ = PlatformColor::BestSupportedTextureFormat( |
| (...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2004 | 2006 |
| 2005 const int kImportance = 2; | 2007 const int kImportance = 2; |
| 2006 pmd->CreateSharedGlobalAllocatorDump(guid); | 2008 pmd->CreateSharedGlobalAllocatorDump(guid); |
| 2007 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance); | 2009 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance); |
| 2008 } | 2010 } |
| 2009 | 2011 |
| 2010 return true; | 2012 return true; |
| 2011 } | 2013 } |
| 2012 | 2014 |
| 2013 } // namespace cc | 2015 } // namespace cc |
| OLD | NEW |