Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_factory_impl.cc

Issue 429863002: Remove GLInProcessContext::CreateContext() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/browser/android/in_process/synchronous_compositor_factory_impl .h" 5 #include "content/browser/android/in_process/synchronous_compositor_factory_impl .h"
6 6
7 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h" 7 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/renderer/gpu/frame_swap_message_queue.h" 9 #include "content/renderer/gpu/frame_swap_message_queue.h"
10 #include "gpu/command_buffer/client/gl_in_process_context.h" 10 #include "gpu/command_buffer/client/gl_in_process_context.h"
(...skipping 28 matching lines...) Expand all
39 39
40 gpu::GLInProcessContextAttribs in_process_attribs; 40 gpu::GLInProcessContextAttribs in_process_attribs;
41 WebGraphicsContext3DInProcessCommandBufferImpl::ConvertAttributes( 41 WebGraphicsContext3DInProcessCommandBufferImpl::ConvertAttributes(
42 attributes, &in_process_attribs); 42 attributes, &in_process_attribs);
43 in_process_attribs.lose_context_when_out_of_memory = 1; 43 in_process_attribs.lose_context_when_out_of_memory = 1;
44 44
45 scoped_ptr<gpu::GLInProcessContext> context( 45 scoped_ptr<gpu::GLInProcessContext> context(
46 gpu::GLInProcessContext::Create(NULL /* service */, 46 gpu::GLInProcessContext::Create(NULL /* service */,
47 NULL /* surface */, 47 NULL /* surface */,
48 true /* is_offscreen */, 48 true /* is_offscreen */,
49 gfx::kNullAcceleratedWidget,
50 gfx::Size(1, 1), 49 gfx::Size(1, 1),
51 NULL /* share_context */, 50 NULL /* share_context */,
52 false /* share_resources */, 51 false /* share_resources */,
53 in_process_attribs, 52 in_process_attribs,
54 gpu_preference)); 53 gpu_preference));
55 return context.Pass(); 54 return context.Pass();
56 } 55 }
57 56
58 scoped_ptr<gpu::GLInProcessContext> CreateContext( 57 scoped_ptr<gpu::GLInProcessContext> CreateContext(
59 scoped_refptr<gpu::InProcessCommandBuffer::Service> service, 58 scoped_refptr<gpu::InProcessCommandBuffer::Service> service,
60 gpu::GLInProcessContext* share_context) { 59 gpu::GLInProcessContext* share_context) {
61 const gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; 60 const gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
62 gpu::GLInProcessContextAttribs in_process_attribs; 61 gpu::GLInProcessContextAttribs in_process_attribs;
63 WebGraphicsContext3DInProcessCommandBufferImpl::ConvertAttributes( 62 WebGraphicsContext3DInProcessCommandBufferImpl::ConvertAttributes(
64 GetDefaultAttribs(), &in_process_attribs); 63 GetDefaultAttribs(), &in_process_attribs);
65 in_process_attribs.lose_context_when_out_of_memory = 1; 64 in_process_attribs.lose_context_when_out_of_memory = 1;
66 65
67 scoped_ptr<gpu::GLInProcessContext> context( 66 scoped_ptr<gpu::GLInProcessContext> context(
68 gpu::GLInProcessContext::Create(service, 67 gpu::GLInProcessContext::Create(service,
69 NULL /* surface */, 68 NULL /* surface */,
70 false /* is_offscreen */, 69 false /* is_offscreen */,
71 gfx::kNullAcceleratedWidget,
72 gfx::Size(1, 1), 70 gfx::Size(1, 1),
73 share_context, 71 share_context,
74 false /* share_resources */, 72 false /* share_resources */,
75 in_process_attribs, 73 in_process_attribs,
76 gpu_preference)); 74 gpu_preference));
77 return context.Pass(); 75 return context.Pass();
78 } 76 }
79 77
80 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> WrapContext( 78 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> WrapContext(
81 scoped_ptr<gpu::GLInProcessContext> context) { 79 scoped_ptr<gpu::GLInProcessContext> context) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 DCHECK(!service_); 260 DCHECK(!service_);
263 service_ = service; 261 service_ = service;
264 } 262 }
265 263
266 void SynchronousCompositorFactoryImpl::SetRecordFullDocument( 264 void SynchronousCompositorFactoryImpl::SetRecordFullDocument(
267 bool record_full_document) { 265 bool record_full_document) {
268 record_full_layer_ = record_full_document; 266 record_full_layer_ = record_full_document;
269 } 267 }
270 268
271 } // namespace content 269 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698