Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "content/browser/android/content_view_render_view.h" | 5 #include "content/browser/android/content_view_render_view.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 if (current_surface_format_ != format) { | 113 if (current_surface_format_ != format) { |
| 114 current_surface_format_ = format; | 114 current_surface_format_ = format; |
| 115 compositor_->SetSurface(surface); | 115 compositor_->SetSurface(surface); |
| 116 } | 116 } |
| 117 compositor_->SetWindowBounds(gfx::Size(width, height)); | 117 compositor_->SetWindowBounds(gfx::Size(width, height)); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void ContentViewRenderView::SetOverlayVideoMode( | 120 void ContentViewRenderView::SetOverlayVideoMode( |
| 121 JNIEnv* env, jobject obj, bool enabled) { | 121 JNIEnv* env, jobject obj, bool enabled) { |
| 122 compositor_->SetHasTransparentBackground(enabled); | 122 compositor_->SetHasTransparentBackground(enabled); |
| 123 SetNeedsComposite(env, obj); | |
|
Ted C
2014/08/23 00:47:11
was this missing from before?
no sievers
2014/08/25 17:20:42
am also wondering why this is needed
David Trainor- moved to gerrit
2014/08/25 17:30:05
I saw we had this in CompositorView and assumed us
| |
| 124 } | |
| 125 | |
| 126 void ContentViewRenderView::SetNeedsComposite(JNIEnv* env, jobject obj) { | |
| 127 compositor_->SetNeedsComposite(); | |
| 123 } | 128 } |
| 124 | 129 |
| 125 void ContentViewRenderView::Layout() { | 130 void ContentViewRenderView::Layout() { |
| 126 JNIEnv* env = base::android::AttachCurrentThread(); | 131 JNIEnv* env = base::android::AttachCurrentThread(); |
| 127 Java_ContentViewRenderView_onCompositorLayout(env, java_obj_.obj()); | 132 Java_ContentViewRenderView_onCompositorLayout(env, java_obj_.obj()); |
| 128 } | 133 } |
| 129 | 134 |
| 130 void ContentViewRenderView::OnSwapBuffersCompleted(int pending_swap_buffers) { | 135 void ContentViewRenderView::OnSwapBuffersCompleted(int pending_swap_buffers) { |
| 131 JNIEnv* env = base::android::AttachCurrentThread(); | 136 JNIEnv* env = base::android::AttachCurrentThread(); |
| 132 Java_ContentViewRenderView_onSwapBuffersCompleted(env, java_obj_.obj()); | 137 Java_ContentViewRenderView_onSwapBuffersCompleted(env, java_obj_.obj()); |
| 133 } | 138 } |
| 134 | 139 |
| 135 void ContentViewRenderView::InitCompositor() { | 140 void ContentViewRenderView::InitCompositor() { |
| 136 if (!compositor_) | 141 if (!compositor_) |
| 137 compositor_.reset(Compositor::Create(this, root_window_)); | 142 compositor_.reset(Compositor::Create(this, root_window_)); |
| 138 } | 143 } |
| 139 } // namespace content | 144 } // namespace content |
| OLD | NEW |