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 "android_webview/browser/hardware_renderer.h" | 5 #include "android_webview/browser/hardware_renderer.h" |
6 | 6 |
7 #include "android_webview/browser/aw_gl_surface.h" | 7 #include "android_webview/browser/aw_gl_surface.h" |
8 #include "android_webview/browser/deferred_gpu_command_service.h" | 8 #include "android_webview/browser/deferred_gpu_command_service.h" |
9 #include "android_webview/browser/parent_output_surface.h" | 9 #include "android_webview/browser/parent_output_surface.h" |
10 #include "android_webview/browser/shared_renderer_state.h" | 10 #include "android_webview/browser/shared_renderer_state.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 scoped_ptr<gpu::GLInProcessContext> context(gpu::GLInProcessContext::Create( | 55 scoped_ptr<gpu::GLInProcessContext> context(gpu::GLInProcessContext::Create( |
56 service, | 56 service, |
57 surface, | 57 surface, |
58 surface->IsOffscreen(), | 58 surface->IsOffscreen(), |
59 gfx::kNullAcceleratedWidget, | 59 gfx::kNullAcceleratedWidget, |
60 surface->GetSize(), | 60 surface->GetSize(), |
61 NULL /* share_context */, | 61 NULL /* share_context */, |
62 false /* share_resources */, | 62 false /* share_resources */, |
63 attribs_for_gles2, | 63 attribs_for_gles2, |
64 gpu_preference, | 64 gpu_preference, |
65 gpu::GLInProcessContextSharedMemoryLimits())); | 65 gpu::GLInProcessContextSharedMemoryLimits(), |
| 66 nullptr, |
| 67 nullptr)); |
66 DCHECK(context.get()); | 68 DCHECK(context.get()); |
67 | 69 |
68 return webkit::gpu::ContextProviderInProcess::Create( | 70 return webkit::gpu::ContextProviderInProcess::Create( |
69 WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext( | 71 WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext( |
70 context.Pass(), attributes), | 72 context.Pass(), attributes), |
71 "Parent-Compositor"); | 73 "Parent-Compositor"); |
72 } | 74 } |
73 | 75 |
74 } // namespace | 76 } // namespace |
75 | 77 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 } | 264 } |
263 | 265 |
264 void HardwareRenderer::UnusedResourcesAreAvailable() { | 266 void HardwareRenderer::UnusedResourcesAreAvailable() { |
265 cc::ReturnedResourceArray returned_resources; | 267 cc::ReturnedResourceArray returned_resources; |
266 resource_collection_->TakeUnusedResourcesForChildCompositor( | 268 resource_collection_->TakeUnusedResourcesForChildCompositor( |
267 &returned_resources); | 269 &returned_resources); |
268 shared_renderer_state_->InsertReturnedResourcesOnRT(returned_resources); | 270 shared_renderer_state_->InsertReturnedResourcesOnRT(returned_resources); |
269 } | 271 } |
270 | 272 |
271 } // namespace android_webview | 273 } // namespace android_webview |
OLD | NEW |