OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "webkit/common/gpu/context_provider_in_process.h" | 5 #include "webkit/common/gpu/context_provider_in_process.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 } | 47 } |
48 | 48 |
49 // static | 49 // static |
50 scoped_refptr<ContextProviderInProcess> | 50 scoped_refptr<ContextProviderInProcess> |
51 ContextProviderInProcess::CreateOffscreen( | 51 ContextProviderInProcess::CreateOffscreen( |
52 bool lose_context_when_out_of_memory) { | 52 bool lose_context_when_out_of_memory) { |
53 blink::WebGraphicsContext3D::Attributes attributes; | 53 blink::WebGraphicsContext3D::Attributes attributes; |
54 attributes.depth = false; | 54 attributes.depth = false; |
55 attributes.stencil = true; | 55 attributes.stencil = true; |
56 attributes.antialias = false; | 56 attributes.antialias = false; |
57 attributes.shareResources = true; | |
no sievers
2014/09/04 21:03:08
Let's see what the tests say about this and this c
| |
58 attributes.noAutomaticFlushes = true; | 57 attributes.noAutomaticFlushes = true; |
59 | 58 |
60 return Create( | 59 return Create( |
61 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( | 60 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( |
62 attributes, lose_context_when_out_of_memory), | 61 attributes, lose_context_when_out_of_memory), |
63 "Offscreen"); | 62 "Offscreen"); |
64 } | 63 } |
65 | 64 |
66 ContextProviderInProcess::ContextProviderInProcess( | 65 ContextProviderInProcess::ContextProviderInProcess( |
67 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d, | 66 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d, |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 lost_context_callback_ = lost_context_callback; | 206 lost_context_callback_ = lost_context_callback; |
208 } | 207 } |
209 | 208 |
210 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( | 209 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( |
211 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { | 210 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { |
212 // There's no memory manager for the in-process implementation. | 211 // There's no memory manager for the in-process implementation. |
213 } | 212 } |
214 | 213 |
215 } // namespace gpu | 214 } // namespace gpu |
216 } // namespace webkit | 215 } // namespace webkit |
OLD | NEW |