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

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

Issue 609973002: Move InitializeOnCurrentThread down from WebGraphicsContext3DImpl to WebGraphicsContext3DCommandBuf… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback3 Created 6 years, 2 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 "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h" 8 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/renderer/gpu/frame_swap_message_queue.h" 10 #include "content/renderer/gpu/frame_swap_message_queue.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 SynchronousCompositorFactoryImpl::CreateStreamTextureFactory(int frame_id) { 216 SynchronousCompositorFactoryImpl::CreateStreamTextureFactory(int frame_id) {
217 scoped_refptr<StreamTextureFactorySynchronousImpl> factory( 217 scoped_refptr<StreamTextureFactorySynchronousImpl> factory(
218 StreamTextureFactorySynchronousImpl::Create( 218 StreamTextureFactorySynchronousImpl::Create(
219 base::Bind( 219 base::Bind(
220 &SynchronousCompositorFactoryImpl::TryCreateStreamTextureFactory, 220 &SynchronousCompositorFactoryImpl::TryCreateStreamTextureFactory,
221 base::Unretained(this)), 221 base::Unretained(this)),
222 frame_id)); 222 frame_id));
223 return factory; 223 return factory;
224 } 224 }
225 225
226 webkit::gpu::WebGraphicsContext3DImpl* 226 webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl*
227 SynchronousCompositorFactoryImpl::CreateOffscreenGraphicsContext3D( 227 SynchronousCompositorFactoryImpl::CreateOffscreenGraphicsContext3D(
228 const blink::WebGraphicsContext3D::Attributes& attributes) { 228 const blink::WebGraphicsContext3D::Attributes& attributes) {
229 return WrapContextWithAttributes(CreateOffscreenContext(attributes), 229 return WrapContextWithAttributes(CreateOffscreenContext(attributes),
230 attributes).release(); 230 attributes).release();
231 } 231 }
232 232
233 void SynchronousCompositorFactoryImpl::CompositorInitializedHardwareDraw() { 233 void SynchronousCompositorFactoryImpl::CompositorInitializedHardwareDraw() {
234 base::AutoLock lock(num_hardware_compositor_lock_); 234 base::AutoLock lock(num_hardware_compositor_lock_);
235 num_hardware_compositors_++; 235 num_hardware_compositors_++;
236 if (num_hardware_compositors_ == 1 && main_thread_proxy_) { 236 if (num_hardware_compositors_ == 1 && main_thread_proxy_) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 DCHECK(!service_); 289 DCHECK(!service_);
290 service_ = service; 290 service_ = service;
291 } 291 }
292 292
293 void SynchronousCompositorFactoryImpl::SetRecordFullDocument( 293 void SynchronousCompositorFactoryImpl::SetRecordFullDocument(
294 bool record_full_document) { 294 bool record_full_document) {
295 record_full_layer_ = record_full_document; 295 record_full_layer_ = record_full_document;
296 } 296 }
297 297
298 } // namespace content 298 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698