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

Side by Side Diff: blimp/client/app/android/blimp_view.h

Issue 1965843002: Revert of Changed Blimp client to start with white screen before drawing contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_ 5 #ifndef BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_
6 #define BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_ 6 #define BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "blimp/client/app/android/blimp_compositor_manager_android.h"
13 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
14 13
15 namespace gfx { 14 namespace gfx {
16 class Size; 15 class Size;
17 } 16 }
18 17
19 namespace blimp { 18 namespace blimp {
20 namespace client { 19 namespace client {
21 20
21 class BlimpCompositorManagerAndroid;
22 class RenderWidgetFeature; 22 class RenderWidgetFeature;
23 23
24 // The native component of org.chromium.blimp.BlimpView. This builds and 24 // The native component of org.chromium.blimp.BlimpView. This builds and
25 // maintains a BlimpCompositorAndroid and handles notifying the compositor of 25 // maintains a BlimpCompositorAndroid and handles notifying the compositor of
26 // SurfaceView surface changes (size, creation, destruction, etc.). 26 // SurfaceView surface changes (size, creation, destruction, etc.).
27 class BlimpView : public BlimpCompositorManagerClient { 27 class BlimpView {
28 public: 28 public:
29 static bool RegisterJni(JNIEnv* env); 29 static bool RegisterJni(JNIEnv* env);
30 30
31 // |real_size| is the total display area including system decorations (see 31 // |real_size| is the total display area including system decorations (see
32 // android.view.Display.getRealSize()). |size| is the total display 32 // android.view.Display.getRealSize()). |size| is the total display
33 // area not including system decorations (see android.view.Display.getSize()). 33 // area not including system decorations (see android.view.Display.getSize()).
34 // |dp_to_px| is the scale factor that is required to convert dp (device 34 // |dp_to_px| is the scale factor that is required to convert dp (device
35 // pixels) to px. 35 // pixels) to px.
36 BlimpView(JNIEnv* env, 36 BlimpView(JNIEnv* env,
37 const base::android::JavaParamRef<jobject>& jobj, 37 const base::android::JavaParamRef<jobject>& jobj,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 jint android_tool_type_0, 85 jint android_tool_type_0,
86 jint android_tool_type_1, 86 jint android_tool_type_1,
87 jint android_button_state, 87 jint android_button_state,
88 jint android_meta_state); 88 jint android_meta_state);
89 89
90 private: 90 private:
91 virtual ~BlimpView(); 91 virtual ~BlimpView();
92 92
93 void ReleaseAcceleratedWidget(); 93 void ReleaseAcceleratedWidget();
94 94
95 // BlimpCompositorManagerClient implementation.
96 void OnSwapBuffersCompleted() override;
97
98 // Reference to the Java object which owns this class. 95 // Reference to the Java object which owns this class.
99 base::android::ScopedJavaGlobalRef<jobject> java_obj_; 96 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
100 97
101 const float device_scale_factor_; 98 const float device_scale_factor_;
102 99
103 std::unique_ptr<BlimpCompositorManagerAndroid> compositor_manager_; 100 std::unique_ptr<BlimpCompositorManagerAndroid> compositor_manager_;
104 101
105 // The format of the current surface owned by |compositor_|. See 102 // The format of the current surface owned by |compositor_|. See
106 // android.graphics.PixelFormat.java. 103 // android.graphics.PixelFormat.java.
107 int current_surface_format_; 104 int current_surface_format_;
108 105
109 gfx::AcceleratedWidget window_; 106 gfx::AcceleratedWidget window_;
110 107
111 DISALLOW_COPY_AND_ASSIGN(BlimpView); 108 DISALLOW_COPY_AND_ASSIGN(BlimpView);
112 }; 109 };
113 110
114 } // namespace client 111 } // namespace client
115 } // namespace blimp 112 } // namespace blimp
116 113
117 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_ 114 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_
OLDNEW
« 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