| 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 17 matching lines...) Expand all Loading... |
| 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(); | 35 result.premultipliedAlpha = attrs.premultipliedAlpha(); |
| 36 result.failIfMajorPerformanceCaveat = attrs.failIfMajorPerformanceCaveat(); | 36 result.failIfMajorPerformanceCaveat = attrs.failIfMajorPerformanceCaveat(); |
| 37 | 37 |
| 38 result.noExtensions = true; | |
| 39 result.shareResources = false; | 38 result.shareResources = false; |
| 40 result.preferDiscreteGPU = true; | 39 result.preferDiscreteGPU = true; |
| 41 | 40 |
| 42 result.topDocumentURL = topDocumentURL; | 41 result.topDocumentURL = topDocumentURL; |
| 43 | 42 |
| 44 result.webGL = true; | |
| 45 result.webGLVersion = webGLVersion; | 43 result.webGLVersion = webGLVersion; |
| 46 return result; | 44 return result; |
| 47 } | 45 } |
| 48 | 46 |
| 49 } // namespace blink | 47 } // namespace blink |
| OLD | NEW |