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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 755643004: Replace SystemUIResourceManager with ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unittest Created 6 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 did_post_swapbuffers_ = false; 313 did_post_swapbuffers_ = false;
314 host_->Composite(frame_time); 314 host_->Composite(frame_time);
315 if (did_post_swapbuffers_) 315 if (did_post_swapbuffers_)
316 pending_swapbuffers_++; 316 pending_swapbuffers_++;
317 317
318 // Need to track vsync to avoid compositing more than once per frame. 318 // Need to track vsync to avoid compositing more than once per frame.
319 root_window_->RequestVSyncUpdate(); 319 root_window_->RequestVSyncUpdate();
320 } 320 }
321 321
322 UIResourceProvider& CompositorImpl::GetUIResourceProvider() { 322 ui::UIResourceProvider& CompositorImpl::GetUIResourceProvider() {
323 return ui_resource_provider_; 323 return ui_resource_provider_;
324 } 324 }
325 325
326 ui::ResourceManager& CompositorImpl::GetResourceManager() { 326 ui::ResourceManager& CompositorImpl::GetResourceManager() {
327 return resource_manager_; 327 return resource_manager_;
328 } 328 }
329 329
330 ui::SystemUIResourceManager& CompositorImpl::GetSystemUIResourceManager() { 330 ui::SystemUIResourceManager& CompositorImpl::GetSystemUIResourceManager() {
jdduke (slow) 2014/12/09 16:11:07 OK, but eventually I'd like this interface to go a
331 return ui_resource_provider_.GetSystemUIResourceManager(); 331 return resource_manager_;
332 } 332 }
333 333
334 void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) { 334 void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) {
335 if (subroot_layer_.get()) { 335 if (subroot_layer_.get()) {
336 subroot_layer_->RemoveFromParent(); 336 subroot_layer_->RemoveFromParent();
337 subroot_layer_ = NULL; 337 subroot_layer_ = NULL;
338 } 338 }
339 if (root_layer.get()) { 339 if (root_layer.get()) {
340 subroot_layer_ = root_layer; 340 subroot_layer_ = root_layer;
341 root_layer_->AddChild(root_layer); 341 root_layer_->AddChild(root_layer);
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 } 680 }
681 681
682 void CompositorImpl::SetNeedsAnimate() { 682 void CompositorImpl::SetNeedsAnimate() {
683 if (!host_) 683 if (!host_)
684 return; 684 return;
685 685
686 host_->SetNeedsAnimate(); 686 host_->SetNeedsAnimate();
687 } 687 }
688 688
689 } // namespace content 689 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698