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

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

Issue 1653553002: blimp: Use remote client LayerTreeHost in the BlimpCompositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run tests for linux only for now. Created 4 years, 10 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
« no previous file with comments | « blimp/client/BUILD.gn ('k') | blimp/client/app/linux/blimp_display_manager.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 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_android.h" 10 #include "blimp/client/app/android/blimp_compositor_android.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 current_surface_format_ = format; 78 current_surface_format_ = format;
79 ReleaseAcceleratedWidget(); 79 ReleaseAcceleratedWidget();
80 80
81 if (jsurface) { 81 if (jsurface) {
82 base::android::ScopedJavaLocalFrame scoped_local_reference_frame(env); 82 base::android::ScopedJavaLocalFrame scoped_local_reference_frame(env);
83 window_ = ANativeWindow_fromSurface(env, jsurface); 83 window_ = ANativeWindow_fromSurface(env, jsurface);
84 compositor_->SetAcceleratedWidget(window_); 84 compositor_->SetAcceleratedWidget(window_);
85 compositor_->SetVisible(true); 85 compositor_->SetVisible(true);
86 } 86 }
87 } 87 }
88
89 compositor_->SetSize(gfx::Size(width, height));
90 } 88 }
91 89
92 void BlimpView::OnSurfaceCreated(JNIEnv* env, 90 void BlimpView::OnSurfaceCreated(JNIEnv* env,
93 const JavaParamRef<jobject>& jobj) { 91 const JavaParamRef<jobject>& jobj) {
94 current_surface_format_ = 0 /** PixelFormat.UNKNOWN */; 92 current_surface_format_ = 0 /** PixelFormat.UNKNOWN */;
95 } 93 }
96 94
97 void BlimpView::OnSurfaceDestroyed(JNIEnv* env, 95 void BlimpView::OnSurfaceDestroyed(JNIEnv* env,
98 const JavaParamRef<jobject>& jobj) { 96 const JavaParamRef<jobject>& jobj) {
99 current_surface_format_ = 0 /** PixelFormat.UNKNOWN */; 97 current_surface_format_ = 0 /** PixelFormat.UNKNOWN */;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 raw_pos_x - pos_x_0, 170 raw_pos_x - pos_x_0,
173 raw_pos_y - pos_y_0, 171 raw_pos_y - pos_y_0,
174 pointer0, 172 pointer0,
175 pointer1); 173 pointer1);
176 174
177 return compositor_->OnTouchEvent(event); 175 return compositor_->OnTouchEvent(event);
178 } 176 }
179 177
180 } // namespace client 178 } // namespace client
181 } // namespace blimp 179 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/BUILD.gn ('k') | blimp/client/app/linux/blimp_display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698