OLD | NEW |
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/android/content_view_core_impl.h" | 5 #include "content/browser/android/content_view_core_impl.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 base::TimeTicks::FromInternalValue(timebase_micros), | 1229 base::TimeTicks::FromInternalValue(timebase_micros), |
1230 base::TimeDelta::FromMicroseconds(interval_micros)); | 1230 base::TimeDelta::FromMicroseconds(interval_micros)); |
1231 } | 1231 } |
1232 | 1232 |
1233 void ContentViewCoreImpl::OnVSync(JNIEnv* env, jobject /* obj */, | 1233 void ContentViewCoreImpl::OnVSync(JNIEnv* env, jobject /* obj */, |
1234 jlong frame_time_micros) { | 1234 jlong frame_time_micros) { |
1235 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 1235 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
1236 if (!view) | 1236 if (!view) |
1237 return; | 1237 return; |
1238 | 1238 |
1239 view->SendVSync(base::TimeTicks::FromInternalValue(frame_time_micros)); | 1239 view->SendBeginChildFrame( |
| 1240 base::TimeTicks::FromInternalValue(frame_time_micros)); |
1240 } | 1241 } |
1241 | 1242 |
1242 jboolean ContentViewCoreImpl::PopulateBitmapFromCompositor(JNIEnv* env, | 1243 jboolean ContentViewCoreImpl::PopulateBitmapFromCompositor(JNIEnv* env, |
1243 jobject obj, | 1244 jobject obj, |
1244 jobject jbitmap) { | 1245 jobject jbitmap) { |
1245 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 1246 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
1246 if (!view) | 1247 if (!view) |
1247 return false; | 1248 return false; |
1248 | 1249 |
1249 return view->PopulateBitmapWithContents(jbitmap); | 1250 return view->PopulateBitmapWithContents(jbitmap); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1546 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1546 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1547 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1547 return reinterpret_cast<jint>(view); | 1548 return reinterpret_cast<jint>(view); |
1548 } | 1549 } |
1549 | 1550 |
1550 bool RegisterContentViewCore(JNIEnv* env) { | 1551 bool RegisterContentViewCore(JNIEnv* env) { |
1551 return RegisterNativesImpl(env); | 1552 return RegisterNativesImpl(env); |
1552 } | 1553 } |
1553 | 1554 |
1554 } // namespace content | 1555 } // namespace content |
OLD | NEW |