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

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

Issue 1925863003: 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 #include "blimp/client/app/android/blimp_view.h" 5 #include "blimp/client/app/android/blimp_view.h"
6 6
7 #include <android/native_window_jni.h> 7 #include <android/native_window_jni.h>
8 8
9 #include "blimp/client/app/android/blimp_client_session_android.h" 9 #include "blimp/client/app/android/blimp_client_session_android.h"
10 #include "blimp/client/app/android/blimp_compositor_manager_android.h" 10 #include "blimp/client/app/android/blimp_compositor_manager_android.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const gfx::Size& real_size, 46 const gfx::Size& real_size,
47 const gfx::Size& size, 47 const gfx::Size& size,
48 float dp_to_px, 48 float dp_to_px,
49 RenderWidgetFeature* render_widget_feature) 49 RenderWidgetFeature* render_widget_feature)
50 : device_scale_factor_(dp_to_px), 50 : device_scale_factor_(dp_to_px),
51 compositor_manager_(BlimpCompositorManagerAndroid::Create(real_size, 51 compositor_manager_(BlimpCompositorManagerAndroid::Create(real_size,
52 size, 52 size,
53 render_widget_feature)), 53 render_widget_feature)),
54 current_surface_format_(0), 54 current_surface_format_(0),
55 window_(gfx::kNullAcceleratedWidget) { 55 window_(gfx::kNullAcceleratedWidget) {
56 compositor_manager_->SetBlimpView(this);
56 java_obj_.Reset(env, jobj); 57 java_obj_.Reset(env, jobj);
57 } 58 }
58 59
59 BlimpView::~BlimpView() { 60 BlimpView::~BlimpView() {
60 ReleaseAcceleratedWidget(); 61 ReleaseAcceleratedWidget();
61 } 62 }
62 63
63 void BlimpView::Destroy(JNIEnv* env, const JavaParamRef<jobject>& jobj) { 64 void BlimpView::Destroy(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
64 delete this; 65 delete this;
65 } 66 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 android_button_state, 168 android_button_state,
168 android_meta_state, 169 android_meta_state,
169 raw_pos_x - pos_x_0, 170 raw_pos_x - pos_x_0,
170 raw_pos_y - pos_y_0, 171 raw_pos_y - pos_y_0,
171 pointer0, 172 pointer0,
172 pointer1); 173 pointer1);
173 174
174 return compositor_manager_->OnTouchEvent(event); 175 return compositor_manager_->OnTouchEvent(event);
175 } 176 }
176 177
178 void BlimpView::OnSwapBuffersCompleted() {
179 JNIEnv* env = base::android::AttachCurrentThread();
180 Java_BlimpView_onSwapBuffersCompleted(env, java_obj_.obj());
181 }
182
177 } // namespace client 183 } // namespace client
178 } // namespace blimp 184 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698