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

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: Fix extension check. 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 (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.oes_texture_float_linear = true; 55 adjusted_disallowed_features.oes_texture_float_linear = true;
54 } 56 }
55 return adjusted_disallowed_features; 57 return adjusted_disallowed_features;
56 } 58 }
57 59
58 } // namespace anonymous
59
60 ContextGroup::ContextGroup( 60 ContextGroup::ContextGroup(
61 const GpuPreferences& gpu_preferences, 61 const GpuPreferences& gpu_preferences,
62 const scoped_refptr<MailboxManager>& mailbox_manager, 62 const scoped_refptr<MailboxManager>& mailbox_manager,
63 const scoped_refptr<MemoryTracker>& memory_tracker, 63 const scoped_refptr<MemoryTracker>& memory_tracker,
64 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, 64 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache,
65 const scoped_refptr<FramebufferCompletenessCache>& 65 const scoped_refptr<FramebufferCompletenessCache>&
66 framebuffer_completeness_cache, 66 framebuffer_completeness_cache,
67 const scoped_refptr<FeatureInfo>& feature_info, 67 const scoped_refptr<FeatureInfo>& feature_info,
68 bool bind_generates_resource, 68 bool bind_generates_resource,
69 gpu::ImageFactory* image_factory, 69 gpu::ImageFactory* image_factory,
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 GLuint client_id, GLuint* service_id) const { 626 GLuint client_id, GLuint* service_id) const {
627 Buffer* buffer = buffer_manager_->GetBuffer(client_id); 627 Buffer* buffer = buffer_manager_->GetBuffer(client_id);
628 if (!buffer) 628 if (!buffer)
629 return false; 629 return false;
630 *service_id = buffer->service_id(); 630 *service_id = buffer->service_id();
631 return true; 631 return true;
632 } 632 }
633 633
634 } // namespace gles2 634 } // namespace gles2
635 } // namespace gpu 635 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698