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

Unified Diff: blimp/client/app/android/blimp_view.h

Issue 2266863003: blimp: Move BlimpCompositor to use delegated rendering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make gn happy Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: blimp/client/app/android/blimp_view.h
diff --git a/blimp/client/app/android/blimp_view.h b/blimp/client/app/android/blimp_view.h
index fa60dec50657243c9888f81bf011805b8a3b3abe..1c417e20ead295511a95e60472d164cd5442bd16 100644
--- a/blimp/client/app/android/blimp_view.h
+++ b/blimp/client/app/android/blimp_view.h
@@ -18,13 +18,13 @@ class Size;
namespace blimp {
namespace client {
-
+class BrowserCompositor;
class RenderWidgetFeature;
// The native component of org.chromium.blimp.BlimpView. This builds and
// maintains a BlimpCompositorAndroid and handles notifying the compositor of
// SurfaceView surface changes (size, creation, destruction, etc.).
-class BlimpView : public BlimpCompositorManagerClient {
+class BlimpView {
public:
static bool RegisterJni(JNIEnv* env);
@@ -42,8 +42,12 @@ class BlimpView : public BlimpCompositorManagerClient {
// Methods called from Java via JNI.
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj);
- void SetNeedsComposite(JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jobj);
+ void OnContentAreaSizeChanged(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& jobj,
+ jint width,
+ jint height,
+ jfloat dpToPx);
void OnSurfaceChanged(JNIEnv* env,
const base::android::JavaParamRef<jobject>& jobj,
jint format,
@@ -54,9 +58,6 @@ class BlimpView : public BlimpCompositorManagerClient {
const base::android::JavaParamRef<jobject>& jobj);
void OnSurfaceDestroyed(JNIEnv* env,
const base::android::JavaParamRef<jobject>& jobj);
- void SetVisibility(JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jobj,
- jboolean visible);
jboolean OnTouchEvent(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
@@ -90,17 +91,17 @@ class BlimpView : public BlimpCompositorManagerClient {
private:
virtual ~BlimpView();
- void ReleaseAcceleratedWidget();
+ void OnSwapBuffersCompleted();
- // BlimpCompositorManagerClient implementation.
- void OnSwapBuffersCompleted() override;
- void DidCommitAndDrawFrame() override;
+ void SetSurface(jobject surface);
// Reference to the Java object which owns this class.
base::android::ScopedJavaGlobalRef<jobject> java_obj_;
const float device_scale_factor_;
+ std::unique_ptr<BrowserCompositor> compositor_;
+
std::unique_ptr<BlimpCompositorManagerAndroid> compositor_manager_;
// The format of the current surface owned by |compositor_|. See
@@ -109,6 +110,8 @@ class BlimpView : public BlimpCompositorManagerClient {
gfx::AcceleratedWidget window_;
+ base::WeakPtrFactory<BlimpView> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(BlimpView);
};
« no previous file with comments | « blimp/client/app/android/blimp_compositor_manager_android.cc ('k') | blimp/client/app/android/blimp_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698