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 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ |
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ |
7 | 7 |
8 #include "base/android/jni_helper.h" | 8 #include "base/android/jni_helper.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 void SetCurrentContentViewCore(JNIEnv* env, jobject obj, | 29 void SetCurrentContentViewCore(JNIEnv* env, jobject obj, |
30 jlong native_content_view_core); | 30 jlong native_content_view_core); |
31 void SurfaceCreated(JNIEnv* env, jobject obj); | 31 void SurfaceCreated(JNIEnv* env, jobject obj); |
32 void SurfaceDestroyed(JNIEnv* env, jobject obj); | 32 void SurfaceDestroyed(JNIEnv* env, jobject obj); |
33 void SurfaceChanged(JNIEnv* env, jobject obj, | 33 void SurfaceChanged(JNIEnv* env, jobject obj, |
34 jint format, jint width, jint height, jobject surface); | 34 jint format, jint width, jint height, jobject surface); |
35 jboolean Composite(JNIEnv* env, jobject obj); | 35 jboolean Composite(JNIEnv* env, jobject obj); |
36 jboolean CompositeToBitmap(JNIEnv* env, jobject obj, jobject java_bitmap); | 36 jboolean CompositeToBitmap(JNIEnv* env, jobject obj, jobject java_bitmap); |
37 void SetOverlayVideoMode(JNIEnv* env, jobject obj, bool enabled); | 37 void SetOverlayVideoMode(JNIEnv* env, jobject obj, bool enabled); |
38 | 38 |
39 // CompositorClient --------------------------------------------------------- | 39 // CompositorClient implementation |
40 virtual void ScheduleComposite() OVERRIDE; | |
41 virtual void OnSwapBuffersPosted() OVERRIDE; | 40 virtual void OnSwapBuffersPosted() OVERRIDE; |
42 virtual void OnSwapBuffersCompleted() OVERRIDE; | |
43 | 41 |
44 private: | 42 private: |
45 virtual ~ContentViewRenderView(); | 43 virtual ~ContentViewRenderView(); |
46 | 44 |
47 void InitCompositor(); | 45 void InitCompositor(); |
48 | 46 |
49 bool buffers_swapped_during_composite_; | |
50 | |
51 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 47 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
52 | 48 |
53 scoped_ptr<content::Compositor> compositor_; | 49 scoped_ptr<content::Compositor> compositor_; |
54 | 50 |
55 gfx::NativeWindow root_window_; | 51 gfx::NativeWindow root_window_; |
56 int current_surface_format_; | 52 int current_surface_format_; |
57 | 53 |
58 DISALLOW_COPY_AND_ASSIGN(ContentViewRenderView); | 54 DISALLOW_COPY_AND_ASSIGN(ContentViewRenderView); |
59 }; | 55 }; |
60 | 56 |
61 | 57 |
62 | 58 |
63 } | 59 } |
64 | 60 |
65 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ | 61 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ |
OLD | NEW |