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

Side by Side Diff: content/browser/android/content_view_render_view.h

Issue 201583004: Add layerTreeBuildHelper to control layer tree in ContentViewRenderView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/android/content_view_render_view.cc » ('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 #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"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "content/public/browser/android/compositor_client.h" 12 #include "content/public/browser/android/compositor_client.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 14
15 namespace content { 15 namespace content {
16 class Compositor; 16 class Compositor;
17 17
18 class ContentViewRenderView : public CompositorClient { 18 class ContentViewRenderView : public CompositorClient {
19 public: 19 public:
20 // Registers the JNI methods for ContentViewRender. 20 // Registers the JNI methods for ContentViewRender.
21 static bool RegisterContentViewRenderView(JNIEnv* env); 21 static bool RegisterContentViewRenderView(JNIEnv* env);
22 22
23 ContentViewRenderView(JNIEnv* env, 23 ContentViewRenderView(JNIEnv* env,
24 jobject obj, 24 jobject obj,
25 gfx::NativeWindow root_window); 25 gfx::NativeWindow root_window);
26 26
27 // Methods called from Java via JNI ----------------------------------------- 27 // Methods called from Java via JNI -----------------------------------------
28 void Destroy(JNIEnv* env, jobject obj); 28 void Destroy(JNIEnv* env, jobject obj);
29 void SetCurrentContentView(JNIEnv* env, jobject obj, 29 virtual void SetCurrentContentView(JNIEnv* env, jobject obj,
30 jlong native_content_view); 30 jlong native_content_view);
David Trainor- moved to gerrit 2014/03/18 18:33:28 Fix indenting
Yusuf 2014/03/19 17:35:09 Done.
31 void SurfaceCreated(JNIEnv* env, jobject obj); 31 virtual 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 virtual 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 ---------------------------------------------------------
40 virtual void ScheduleComposite() OVERRIDE; 40 virtual void ScheduleComposite() OVERRIDE;
41 virtual void OnSwapBuffersPosted() OVERRIDE; 41 virtual void OnSwapBuffersPosted() OVERRIDE;
42 virtual void OnSwapBuffersCompleted() OVERRIDE; 42 virtual void OnSwapBuffersCompleted() OVERRIDE;
43 43 protected:
David Trainor- moved to gerrit 2014/03/18 18:33:28 New line before protected
Yusuf 2014/03/19 17:35:09 Done.
44 private: 44 scoped_ptr<content::Compositor> compositor_;
45 virtual ~ContentViewRenderView();
46 45
47 void InitCompositor(); 46 void InitCompositor();
47 virtual ~ContentViewRenderView();
48 private:
David Trainor- moved to gerrit 2014/03/18 18:33:28 New line before private
Yusuf 2014/03/19 17:35:09 Done.
49 bool buffers_swapped_during_composite_;
48 50
49 bool buffers_swapped_during_composite_; 51 gfx::NativeWindow root_window_;
50 52
51 base::android::ScopedJavaGlobalRef<jobject> java_obj_; 53 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
52 54
53 scoped_ptr<content::Compositor> compositor_;
54
55 gfx::NativeWindow root_window_;
56 int current_surface_format_; 55 int current_surface_format_;
57 56
58 DISALLOW_COPY_AND_ASSIGN(ContentViewRenderView); 57 DISALLOW_COPY_AND_ASSIGN(ContentViewRenderView);
59 }; 58 };
60 59
61
62
63 } 60 }
64 61
65 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ 62 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/content_view_render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698