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

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

Issue 11280097: Initialize compositor early on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed DEPS Created 8 years 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 | Annotate | Revision Log
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return; 82 return;
83 83
84 scheduled_composite_ = true; 84 scheduled_composite_ = true;
85 MessageLoop::current()->PostTask( 85 MessageLoop::current()->PostTask(
86 FROM_HERE, 86 FROM_HERE,
87 base::Bind(&ContentViewRenderView::Composite, 87 base::Bind(&ContentViewRenderView::Composite,
88 weak_factory_.GetWeakPtr())); 88 weak_factory_.GetWeakPtr()));
89 } 89 }
90 90
91 void ContentViewRenderView::InitCompositor() { 91 void ContentViewRenderView::InitCompositor() {
92 if (compositor_.get()) 92 if (!compositor_.get())
93 return; 93 compositor_.reset(Compositor::Create(this));
94
95 Compositor::Initialize();
96 compositor_.reset(Compositor::Create(this));
97 } 94 }
98 95
99 void ContentViewRenderView::Composite() { 96 void ContentViewRenderView::Composite() {
100 if (!compositor_.get()) 97 if (!compositor_.get())
101 return; 98 return;
102 99
103 scheduled_composite_ = false; 100 scheduled_composite_ = false;
104 compositor_->Composite(); 101 compositor_->Composite();
105 } 102 }
106 103
107 } // namespace content 104 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_android.cc ('k') | content/shell/android/shell_library_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698