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

Side by Side Diff: gpu/command_buffer/service/context_group.cc

Issue 2670213005: Hook ANGLE_request_extension up to the passthrough cmd decoder. (Closed)
Patch Set: Address zmo@'s comments Created 3 years, 9 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
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 namespace gles2 { 31 namespace gles2 {
32 32
33 namespace { 33 namespace {
34 34
35 void GetIntegerv(GLenum pname, uint32_t* var) { 35 void GetIntegerv(GLenum pname, uint32_t* var) {
36 GLint value = 0; 36 GLint value = 0;
37 glGetIntegerv(pname, &value); 37 glGetIntegerv(pname, &value);
38 *var = value; 38 *var = value;
39 } 39 }
40 40
41 } // namespace anonymous
42
41 DisallowedFeatures AdjustDisallowedFeatures( 43 DisallowedFeatures AdjustDisallowedFeatures(
42 ContextType context_type, const DisallowedFeatures& disallowed_features) { 44 ContextType context_type, const DisallowedFeatures& disallowed_features) {
43 DisallowedFeatures adjusted_disallowed_features = disallowed_features; 45 DisallowedFeatures adjusted_disallowed_features = disallowed_features;
44 if (context_type == CONTEXT_TYPE_WEBGL1) { 46 if (context_type == CONTEXT_TYPE_WEBGL1) {
45 adjusted_disallowed_features.npot_support = true; 47 adjusted_disallowed_features.npot_support = true;
46 adjusted_disallowed_features.oes_texture_half_float_linear = true; 48 adjusted_disallowed_features.oes_texture_half_float_linear = true;
47 } 49 }
48 if (context_type == CONTEXT_TYPE_WEBGL1 || 50 if (context_type == CONTEXT_TYPE_WEBGL1 ||
49 context_type == CONTEXT_TYPE_WEBGL2) { 51 context_type == CONTEXT_TYPE_WEBGL2) {
50 adjusted_disallowed_features.chromium_color_buffer_float_rgba = true; 52 adjusted_disallowed_features.chromium_color_buffer_float_rgba = true;
51 adjusted_disallowed_features.chromium_color_buffer_float_rgb = true; 53 adjusted_disallowed_features.chromium_color_buffer_float_rgb = true;
52 adjusted_disallowed_features.ext_color_buffer_float = true; 54 adjusted_disallowed_features.ext_color_buffer_float = true;
53 adjusted_disallowed_features.ext_color_buffer_half_float = true; 55 adjusted_disallowed_features.ext_color_buffer_half_float = true;
54 adjusted_disallowed_features.oes_texture_float_linear = true; 56 adjusted_disallowed_features.oes_texture_float_linear = true;
55 } 57 }
56 return adjusted_disallowed_features; 58 return adjusted_disallowed_features;
57 } 59 }
58 60
59 } // namespace anonymous
60
61 ContextGroup::ContextGroup( 61 ContextGroup::ContextGroup(
62 const GpuPreferences& gpu_preferences, 62 const GpuPreferences& gpu_preferences,
63 const scoped_refptr<MailboxManager>& mailbox_manager, 63 const scoped_refptr<MailboxManager>& mailbox_manager,
64 const scoped_refptr<MemoryTracker>& memory_tracker, 64 const scoped_refptr<MemoryTracker>& memory_tracker,
65 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, 65 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache,
66 const scoped_refptr<FramebufferCompletenessCache>& 66 const scoped_refptr<FramebufferCompletenessCache>&
67 framebuffer_completeness_cache, 67 framebuffer_completeness_cache,
68 const scoped_refptr<FeatureInfo>& feature_info, 68 const scoped_refptr<FeatureInfo>& feature_info,
69 bool bind_generates_resource, 69 bool bind_generates_resource,
70 gpu::ImageFactory* image_factory, 70 gpu::ImageFactory* image_factory,
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 GLuint client_id, GLuint* service_id) const { 629 GLuint client_id, GLuint* service_id) const {
630 Buffer* buffer = buffer_manager_->GetBuffer(client_id); 630 Buffer* buffer = buffer_manager_->GetBuffer(client_id);
631 if (!buffer) 631 if (!buffer)
632 return false; 632 return false;
633 *service_id = buffer->service_id(); 633 *service_id = buffer->service_id();
634 return true; 634 return true;
635 } 635 }
636 636
637 } // namespace gles2 637 } // namespace gles2
638 } // namespace gpu 638 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698