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

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

Issue 12804006: cc: Save correct frame begin time to FrameRateCounter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 188402 Created 7 years, 9 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
« no previous file with comments | « cc/thread_proxy.cc ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <map> 9 #include <map>
10 10
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 client_(client), 122 client_(client),
123 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 123 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
124 DCHECK(client); 124 DCHECK(client);
125 } 125 }
126 126
127 CompositorImpl::~CompositorImpl() { 127 CompositorImpl::~CompositorImpl() {
128 } 128 }
129 129
130 void CompositorImpl::Composite() { 130 void CompositorImpl::Composite() {
131 if (host_.get()) 131 if (host_.get())
132 host_->Composite(); 132 host_->Composite(base::TimeTicks::Now());
133 } 133 }
134 134
135 void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) { 135 void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) {
136 root_layer_->RemoveAllChildren(); 136 root_layer_->RemoveAllChildren();
137 root_layer_->AddChild(root_layer); 137 root_layer_->AddChild(root_layer);
138 } 138 }
139 139
140 void CompositorImpl::SetWindowSurface(ANativeWindow* window) { 140 void CompositorImpl::SetWindowSurface(ANativeWindow* window) {
141 GpuSurfaceTracker* tracker = GpuSurfaceTracker::Get(); 141 GpuSurfaceTracker* tracker = GpuSurfaceTracker::Get();
142 142
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 case ANDROID_BITMAP_FORMAT_RGBA_8888: 478 case ANDROID_BITMAP_FORMAT_RGBA_8888:
479 return GL_UNSIGNED_BYTE; 479 return GL_UNSIGNED_BYTE;
480 break; 480 break;
481 case ANDROID_BITMAP_FORMAT_RGB_565: 481 case ANDROID_BITMAP_FORMAT_RGB_565:
482 default: 482 default:
483 return GL_UNSIGNED_SHORT_5_6_5; 483 return GL_UNSIGNED_SHORT_5_6_5;
484 } 484 }
485 } 485 }
486 486
487 } // namespace content 487 } // namespace content
OLDNEW
« no previous file with comments | « cc/thread_proxy.cc ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698