Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "gpu/command_buffer/service/context_group.h" | 5 #include "gpu/command_buffer/service/context_group.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 adjusted_disallowed_features.npot_support = true; | 45 adjusted_disallowed_features.npot_support = true; |
| 46 adjusted_disallowed_features.oes_texture_half_float_linear = true; | 46 adjusted_disallowed_features.oes_texture_half_float_linear = true; |
| 47 } | 47 } |
| 48 if (context_type == CONTEXT_TYPE_WEBGL1 || | 48 if (context_type == CONTEXT_TYPE_WEBGL1 || |
| 49 context_type == CONTEXT_TYPE_WEBGL2) { | 49 context_type == CONTEXT_TYPE_WEBGL2) { |
| 50 adjusted_disallowed_features.chromium_color_buffer_float_rgba = true; | 50 adjusted_disallowed_features.chromium_color_buffer_float_rgba = true; |
| 51 adjusted_disallowed_features.chromium_color_buffer_float_rgb = true; | 51 adjusted_disallowed_features.chromium_color_buffer_float_rgb = true; |
| 52 adjusted_disallowed_features.ext_color_buffer_float = true; | 52 adjusted_disallowed_features.ext_color_buffer_float = true; |
| 53 adjusted_disallowed_features.oes_texture_float_linear = true; | 53 adjusted_disallowed_features.oes_texture_float_linear = true; |
| 54 } | 54 } |
| 55 if (context_type == CONTEXT_TYPE_WEBGL2) { | |
| 56 adjusted_disallowed_features.ext_color_buffer_half_float = true; | |
|
Zhenyao Mo
2017/02/23 05:49:10
This also needs to be disallowed for WebGL1 becaus
| |
| 57 } | |
| 55 return adjusted_disallowed_features; | 58 return adjusted_disallowed_features; |
| 56 } | 59 } |
| 57 | 60 |
| 58 } // namespace anonymous | 61 } // namespace anonymous |
| 59 | 62 |
| 60 ContextGroup::ContextGroup( | 63 ContextGroup::ContextGroup( |
| 61 const GpuPreferences& gpu_preferences, | 64 const GpuPreferences& gpu_preferences, |
| 62 const scoped_refptr<MailboxManager>& mailbox_manager, | 65 const scoped_refptr<MailboxManager>& mailbox_manager, |
| 63 const scoped_refptr<MemoryTracker>& memory_tracker, | 66 const scoped_refptr<MemoryTracker>& memory_tracker, |
| 64 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, | 67 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 628 GLuint client_id, GLuint* service_id) const { | 631 GLuint client_id, GLuint* service_id) const { |
| 629 Buffer* buffer = buffer_manager_->GetBuffer(client_id); | 632 Buffer* buffer = buffer_manager_->GetBuffer(client_id); |
| 630 if (!buffer) | 633 if (!buffer) |
| 631 return false; | 634 return false; |
| 632 *service_id = buffer->service_id(); | 635 *service_id = buffer->service_id(); |
| 633 return true; | 636 return true; |
| 634 } | 637 } |
| 635 | 638 |
| 636 } // namespace gles2 | 639 } // namespace gles2 |
| 637 } // namespace gpu | 640 } // namespace gpu |
| OLD | NEW |