Index: gpu/command_buffer/service/feature_info.cc |
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc |
index a0ebe050a743ddc440dd5054683cbb36a29ec389..e3c3f927cf9ee8cced0b18e096966dd1b58b4081 100644 |
--- a/gpu/command_buffer/service/feature_info.cc |
+++ b/gpu/command_buffer/service/feature_info.cc |
@@ -856,10 +856,11 @@ void FeatureInfo::InitializeFeatures() { |
// Check for multisample support |
// crbug.com/527565 - On some GPUs, MSAA does not perform acceptably for |
- // rasterization. We disable it on non-WebGL contexts. For WebGL contexts |
- // we leave it up to the site to decide whether to enable MSAA. |
+ // rasterization. For externally exposed (WebGL or Pepper) contexts we leave |
+ // it up to the site to decide whether to enable MSAA. |
bool disable_all_multisample = |
- workarounds_.disable_msaa_on_non_webgl_contexts && !IsWebGLContext(); |
+ workarounds_.disable_msaa_on_internal_contexts && !IsWebGLContext() && |
+ !IsPepperContext(); |
if (!disable_all_multisample && |
!workarounds_.disable_chromium_framebuffer_multisample) { |
@@ -1416,6 +1417,7 @@ bool FeatureInfo::IsWebGLContext() const { |
return true; |
case CONTEXT_TYPE_OPENGLES2: |
case CONTEXT_TYPE_OPENGLES3: |
+ case CONTEXT_TYPE_OPENGLES2_PEPPER: |
return false; |
} |
@@ -1423,6 +1425,22 @@ bool FeatureInfo::IsWebGLContext() const { |
return false; |
} |
+bool FeatureInfo::IsPepperContext() const { |
+ // Switch statement to cause a compile-time error if we miss a case. |
+ switch (context_type_) { |
+ case CONTEXT_TYPE_WEBGL1: |
+ case CONTEXT_TYPE_WEBGL2: |
+ case CONTEXT_TYPE_OPENGLES2: |
+ case CONTEXT_TYPE_OPENGLES3: |
+ return false; |
+ case CONTEXT_TYPE_OPENGLES2_PEPPER: |
+ return true; |
+ } |
+ |
+ NOTREACHED(); |
+ return false; |
+} |
+ |
void FeatureInfo::AddExtensionString(const char* s) { |
std::string str(s); |
size_t pos = extensions_.find(str); |