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

Unified Diff: gpu/command_buffer/service/context_group.cc

Issue 1374043005: Blacklist MSAA for GPU Raster on Intel GPUs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ignore_cr
Patch Set: version # Created 5 years, 3 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_group.cc
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index e5b4974a8f413573f6cad86219ee05520faacabe..e22459a7fcc26a2f6ba6db256ee7236dddf70f18 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -36,8 +36,7 @@ ContextGroup::ContextGroup(
const scoped_refptr<SubscriptionRefSet>& subscription_ref_set,
const scoped_refptr<ValueStateMap>& pending_valuebuffer_state,
bool bind_generates_resource)
- : context_type_(CONTEXT_TYPE_OPENGLES2),
- mailbox_manager_(mailbox_manager),
+ : mailbox_manager_(mailbox_manager),
memory_tracker_(memory_tracker),
shader_translator_cache_(shader_translator_cache),
#if defined(OS_MACOSX)
@@ -92,21 +91,18 @@ static void GetIntegerv(GLenum pname, uint32* var) {
bool ContextGroup::Initialize(GLES2Decoder* decoder,
ContextType context_type,
const DisallowedFeatures& disallowed_features) {
- if (!HaveContexts()) {
- context_type_ = context_type;
- } else if (context_type_ != context_type) {
- LOG(ERROR) << "ContextGroup::Initialize failed because the type of "
- << "the context does not fit with the group.";
- return false;
- }
-
- // If we've already initialized the group just add the context.
if (HaveContexts()) {
+ if (context_type != feature_info_->context_type()) {
+ LOG(ERROR) << "ContextGroup::Initialize failed because the type of "
+ << "the context does not fit with the group.";
+ return false;
+ }
+ // If we've already initialized the group just add the context.
decoders_.push_back(base::AsWeakPtr<GLES2Decoder>(decoder));
return true;
}
- if (!feature_info_->Initialize(disallowed_features)) {
+ if (!feature_info_->Initialize(context_type, disallowed_features)) {
LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo "
<< "initialization failed.";
return false;
@@ -146,9 +142,9 @@ bool ContextGroup::Initialize(GLES2Decoder* decoder,
buffer_manager_.reset(
new BufferManager(memory_tracker_.get(), feature_info_.get()));
- framebuffer_manager_.reset(
- new FramebufferManager(max_draw_buffers_, max_color_attachments_,
- context_type, framebuffer_completeness_cache_));
+ framebuffer_manager_.reset(new FramebufferManager(
+ max_draw_buffers_, max_color_attachments_, feature_info_->context_type(),
+ framebuffer_completeness_cache_));
renderbuffer_manager_.reset(new RenderbufferManager(
memory_tracker_.get(), max_renderbuffer_size, max_samples,
feature_info_.get()));
« 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