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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 return; | 77 return; |
78 | 78 |
79 scheduled_composite_ = true; | 79 scheduled_composite_ = true; |
80 MessageLoop::current()->PostTask( | 80 MessageLoop::current()->PostTask( |
81 FROM_HERE, | 81 FROM_HERE, |
82 base::Bind(&ContentViewRenderView::Composite, | 82 base::Bind(&ContentViewRenderView::Composite, |
83 weak_factory_.GetWeakPtr())); | 83 weak_factory_.GetWeakPtr())); |
84 } | 84 } |
85 | 85 |
86 void ContentViewRenderView::InitCompositor() { | 86 void ContentViewRenderView::InitCompositor() { |
87 if (!compositor_.get()) | 87 if (!compositor_) |
88 compositor_.reset(Compositor::Create(this)); | 88 compositor_.reset(Compositor::Create(this)); |
89 } | 89 } |
90 | 90 |
91 void ContentViewRenderView::Composite() { | 91 void ContentViewRenderView::Composite() { |
92 if (!compositor_.get()) | 92 if (!compositor_) |
93 return; | 93 return; |
94 | 94 |
95 scheduled_composite_ = false; | 95 scheduled_composite_ = false; |
96 compositor_->Composite(); | 96 compositor_->Composite(); |
97 } | 97 } |
98 | 98 |
99 } // namespace content | 99 } // namespace content |
OLD | NEW |