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

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

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 max_color_attachments_(1u), 97 max_color_attachments_(1u),
98 max_draw_buffers_(1u), 98 max_draw_buffers_(1u),
99 max_dual_source_draw_buffers_(0u), 99 max_dual_source_draw_buffers_(0u),
100 max_vertex_output_components_(0u), 100 max_vertex_output_components_(0u),
101 max_fragment_input_components_(0u), 101 max_fragment_input_components_(0u),
102 min_program_texel_offset_(0), 102 min_program_texel_offset_(0),
103 max_program_texel_offset_(0), 103 max_program_texel_offset_(0),
104 program_cache_(NULL), 104 program_cache_(NULL),
105 feature_info_(feature_info) { 105 feature_info_(feature_info) {
106 { 106 {
107 DCHECK(feature_info_);
107 if (!mailbox_manager_.get()) 108 if (!mailbox_manager_.get())
108 mailbox_manager_ = new MailboxManagerImpl; 109 mailbox_manager_ = new MailboxManagerImpl;
109 if (!subscription_ref_set_.get()) 110 if (!subscription_ref_set_.get())
110 subscription_ref_set_ = new SubscriptionRefSet(); 111 subscription_ref_set_ = new SubscriptionRefSet();
111 if (!pending_valuebuffer_state_.get()) 112 if (!pending_valuebuffer_state_.get())
112 pending_valuebuffer_state_ = new ValueStateMap(); 113 pending_valuebuffer_state_ = new ValueStateMap();
113 if (!feature_info.get())
114 feature_info_ = new FeatureInfo;
115 transfer_buffer_manager_ = new TransferBufferManager(memory_tracker_.get()); 114 transfer_buffer_manager_ = new TransferBufferManager(memory_tracker_.get());
116 } 115 }
117 } 116 }
118 117
119 bool ContextGroup::Initialize(GLES2Decoder* decoder, 118 bool ContextGroup::Initialize(GLES2Decoder* decoder,
120 ContextType context_type, 119 ContextType context_type,
121 const DisallowedFeatures& disallowed_features) { 120 const DisallowedFeatures& disallowed_features) {
122 if (HaveContexts()) { 121 if (HaveContexts()) {
123 if (context_type != feature_info_->context_type()) { 122 if (context_type != feature_info_->context_type()) {
124 LOG(ERROR) << "ContextGroup::Initialize failed because the type of " 123 LOG(ERROR) << "ContextGroup::Initialize failed because the type of "
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 GLuint client_id, GLuint* service_id) const { 565 GLuint client_id, GLuint* service_id) const {
567 Buffer* buffer = buffer_manager_->GetBuffer(client_id); 566 Buffer* buffer = buffer_manager_->GetBuffer(client_id);
568 if (!buffer) 567 if (!buffer)
569 return false; 568 return false;
570 *service_id = buffer->service_id(); 569 *service_id = buffer->service_id();
571 return true; 570 return true;
572 } 571 }
573 572
574 } // namespace gles2 573 } // namespace gles2
575 } // namespace gpu 574 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/buffer_manager_unittest.cc ('k') | gpu/command_buffer/service/context_group_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698