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

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

Issue 226363004: Global GPU memory manager for android webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove "HardwareRenderer::GetMemoryPolicy" declaration Created 6 years, 8 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 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 DCHECK(output_surface_); 133 DCHECK(output_surface_);
134 134
135 return output_surface_->DemandDrawSw(canvas); 135 return output_surface_->DemandDrawSw(canvas);
136 } 136 }
137 137
138 void SynchronousCompositorImpl::SetMemoryPolicy( 138 void SynchronousCompositorImpl::SetMemoryPolicy(
139 const SynchronousCompositorMemoryPolicy& policy) { 139 const SynchronousCompositorMemoryPolicy& policy) {
140 DCHECK(CalledOnValidThread()); 140 DCHECK(CalledOnValidThread());
141 DCHECK(output_surface_); 141 DCHECK(output_surface_);
142 142
143 return output_surface_->SetMemoryPolicy(policy); 143 output_surface_->SetMemoryPolicy(policy);
boliu 2014/04/18 16:13:09 Do this separately to avoid having to have a conte
144 } 144 }
145 145
146 void SynchronousCompositorImpl::DidChangeRootLayerScrollOffset() { 146 void SynchronousCompositorImpl::DidChangeRootLayerScrollOffset() {
147 if (input_handler_) 147 if (input_handler_)
148 input_handler_->OnRootLayerDelegatedScrollOffsetChanged(); 148 input_handler_->OnRootLayerDelegatedScrollOffsetChanged();
149 } 149 }
150 150
151 void SynchronousCompositorImpl::DidBindOutputSurface( 151 void SynchronousCompositorImpl::DidBindOutputSurface(
152 SynchronousCompositorOutputSurface* output_surface) { 152 SynchronousCompositorOutputSurface* output_surface) {
153 DCHECK(CalledOnValidThread()); 153 DCHECK(CalledOnValidThread());
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 g_factory.Get(); // Ensure it's initialized. 285 g_factory.Get(); // Ensure it's initialized.
286 SynchronousCompositorImpl::CreateForWebContents(contents); 286 SynchronousCompositorImpl::CreateForWebContents(contents);
287 } 287 }
288 if (SynchronousCompositorImpl* instance = 288 if (SynchronousCompositorImpl* instance =
289 SynchronousCompositorImpl::FromWebContents(contents)) { 289 SynchronousCompositorImpl::FromWebContents(contents)) {
290 instance->SetClient(client); 290 instance->SetClient(client);
291 } 291 }
292 } 292 }
293 293
294 } // namespace content 294 } // namespace content
OLDNEW
« android_webview/browser/global_tile_manager.h ('K') | « android_webview/browser/hardware_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698