| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "modules/webgl/WebGLContextAttributeHelpers.h" | 5 #include "modules/webgl/WebGLContextAttributeHelpers.h" |
| 6 | 6 |
| 7 #include "core/frame/Settings.h" | 7 #include "core/frame/Settings.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 { | 25 { |
| 26 WebGraphicsContext3D::Attributes result; | 26 WebGraphicsContext3D::Attributes result; |
| 27 result.alpha = attrs.alpha(); | 27 result.alpha = attrs.alpha(); |
| 28 result.depth = attrs.depth(); | 28 result.depth = attrs.depth(); |
| 29 result.stencil = attrs.stencil(); | 29 result.stencil = attrs.stencil(); |
| 30 result.antialias = attrs.antialias(); | 30 result.antialias = attrs.antialias(); |
| 31 if (attrs.antialias()) { | 31 if (attrs.antialias()) { |
| 32 if (settings && !settings->openGLMultisamplingEnabled()) | 32 if (settings && !settings->openGLMultisamplingEnabled()) |
| 33 result.antialias = false; | 33 result.antialias = false; |
| 34 } | 34 } |
| 35 result.premultipliedAlpha = attrs.premultipliedAlpha(); | |
| 36 result.failIfMajorPerformanceCaveat = attrs.failIfMajorPerformanceCaveat(); | 35 result.failIfMajorPerformanceCaveat = attrs.failIfMajorPerformanceCaveat(); |
| 37 | 36 |
| 38 result.shareResources = false; | 37 result.shareResources = false; |
| 39 result.preferDiscreteGPU = true; | 38 result.preferDiscreteGPU = true; |
| 40 | 39 |
| 41 result.topDocumentURL = topDocumentURL; | 40 result.topDocumentURL = topDocumentURL; |
| 42 | 41 |
| 43 result.webGLVersion = webGLVersion; | 42 result.webGLVersion = webGLVersion; |
| 44 return result; | 43 return result; |
| 45 } | 44 } |
| 46 | 45 |
| 47 } // namespace blink | 46 } // namespace blink |
| OLD | NEW |