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

Side by Side Diff: content/browser/android/content_view_render_view.cc

Issue 230223008: [videofling] Page not rendered after leaving ECA on ICS/JB MR0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ContentViewCoreImpl* content_view = 62 ContentViewCoreImpl* content_view =
63 reinterpret_cast<ContentViewCoreImpl*>(native_content_view); 63 reinterpret_cast<ContentViewCoreImpl*>(native_content_view);
64 if (content_view) 64 if (content_view)
65 compositor_->SetRootLayer(content_view->GetLayer()); 65 compositor_->SetRootLayer(content_view->GetLayer());
66 else 66 else
67 compositor_->SetRootLayer(cc::Layer::Create()); 67 compositor_->SetRootLayer(cc::Layer::Create());
68 } 68 }
69 69
70 void ContentViewRenderView::SurfaceCreated( 70 void ContentViewRenderView::SurfaceCreated(
71 JNIEnv* env, jobject obj) { 71 JNIEnv* env, jobject obj) {
72 current_surface_format_ = 0;
72 InitCompositor(); 73 InitCompositor();
73 } 74 }
74 75
75 void ContentViewRenderView::SurfaceDestroyed(JNIEnv* env, jobject obj) { 76 void ContentViewRenderView::SurfaceDestroyed(JNIEnv* env, jobject obj) {
76 compositor_->SetSurface(NULL); 77 compositor_->SetSurface(NULL);
77 current_surface_format_ = 0; 78 current_surface_format_ = 0;
78 } 79 }
79 80
80 void ContentViewRenderView::SurfaceChanged(JNIEnv* env, jobject obj, 81 void ContentViewRenderView::SurfaceChanged(JNIEnv* env, jobject obj,
81 jint format, jint width, jint height, jobject surface) { 82 jint format, jint width, jint height, jobject surface) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 JNIEnv* env = base::android::AttachCurrentThread(); 124 JNIEnv* env = base::android::AttachCurrentThread();
124 Java_ContentViewRenderView_onSwapBuffersCompleted(env, java_obj_.obj()); 125 Java_ContentViewRenderView_onSwapBuffersCompleted(env, java_obj_.obj());
125 } 126 }
126 127
127 void ContentViewRenderView::InitCompositor() { 128 void ContentViewRenderView::InitCompositor() {
128 if (!compositor_) 129 if (!compositor_)
129 compositor_.reset(Compositor::Create(this, root_window_)); 130 compositor_.reset(Compositor::Create(this, root_window_));
130 } 131 }
131 132
132 } // namespace content 133 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698