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

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

Issue 389973005: Merge 280970 "Add switch to disable recording whole document" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/browser/android/in_process/synchronous_compositor_impl.h" 5 #include "content/browser/android/in_process/synchronous_compositor_impl.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/input/input_handler.h" 9 #include "cc/input/input_handler.h"
10 #include "content/browser/android/in_process/synchronous_compositor_factory_impl .h" 10 #include "content/browser/android/in_process/synchronous_compositor_factory_impl .h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 DCHECK(CalledOnValidThread()); 82 DCHECK(CalledOnValidThread());
83 compositor_client_ = compositor_client; 83 compositor_client_ = compositor_client;
84 } 84 }
85 85
86 // static 86 // static
87 void SynchronousCompositor::SetGpuService( 87 void SynchronousCompositor::SetGpuService(
88 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) { 88 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) {
89 g_factory.Get().SetDeferredGpuService(service); 89 g_factory.Get().SetDeferredGpuService(service);
90 } 90 }
91 91
92 // static
93 void SynchronousCompositor::DisableRecordFullLayer() {
94 g_factory.Get().DisableRecordFullLayer();
95 }
96
92 bool SynchronousCompositorImpl::InitializeHwDraw() { 97 bool SynchronousCompositorImpl::InitializeHwDraw() {
93 DCHECK(CalledOnValidThread()); 98 DCHECK(CalledOnValidThread());
94 DCHECK(output_surface_); 99 DCHECK(output_surface_);
95 100
96 scoped_refptr<cc::ContextProvider> onscreen_context = 101 scoped_refptr<cc::ContextProvider> onscreen_context =
97 g_factory.Get().CreateOnscreenContextProviderForCompositorThread(); 102 g_factory.Get().CreateOnscreenContextProviderForCompositorThread();
98 103
99 bool success = output_surface_->InitializeHwDraw(onscreen_context); 104 bool success = output_surface_->InitializeHwDraw(onscreen_context);
100 105
101 if (success) 106 if (success)
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 g_factory.Get(); // Ensure it's initialized. 289 g_factory.Get(); // Ensure it's initialized.
285 SynchronousCompositorImpl::CreateForWebContents(contents); 290 SynchronousCompositorImpl::CreateForWebContents(contents);
286 } 291 }
287 if (SynchronousCompositorImpl* instance = 292 if (SynchronousCompositorImpl* instance =
288 SynchronousCompositorImpl::FromWebContents(contents)) { 293 SynchronousCompositorImpl::FromWebContents(contents)) {
289 instance->SetClient(client); 294 instance->SetClient(client);
290 } 295 }
291 } 296 }
292 297
293 } // namespace content 298 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698