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

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_impl.cc

Issue 16907002: Update Android to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/in_process/synchronous_compositor_impl.h" 5 #include "content/browser/android/in_process/synchronous_compositor_impl.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "cc/input/input_handler.h" 9 #include "cc/input/input_handler.h"
10 #include "cc/input/layer_scroll_offset_delegate.h" 10 #include "cc/input/layer_scroll_offset_delegate.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 virtual scoped_refptr<cc::ContextProvider> 66 virtual scoped_refptr<cc::ContextProvider>
67 GetOffscreenContextProviderForMainThread() OVERRIDE { 67 GetOffscreenContextProviderForMainThread() OVERRIDE {
68 NOTIMPLEMENTED() 68 NOTIMPLEMENTED()
69 << "Synchronous compositor does not support main thread context yet."; 69 << "Synchronous compositor does not support main thread context yet.";
70 return scoped_refptr<cc::ContextProvider>(); 70 return scoped_refptr<cc::ContextProvider>();
71 } 71 }
72 72
73 virtual scoped_refptr<cc::ContextProvider> 73 virtual scoped_refptr<cc::ContextProvider>
74 GetOffscreenContextProviderForCompositorThread() OVERRIDE { 74 GetOffscreenContextProviderForCompositorThread() OVERRIDE {
75 if (!offscreen_context_for_compositor_thread_ || 75 if (!offscreen_context_for_compositor_thread_.get() ||
76 offscreen_context_for_compositor_thread_->DestroyedOnMainThread()) { 76 offscreen_context_for_compositor_thread_->DestroyedOnMainThread()) {
77 offscreen_context_for_compositor_thread_ = 77 offscreen_context_for_compositor_thread_ =
78 webkit::gpu::ContextProviderInProcess::Create(); 78 webkit::gpu::ContextProviderInProcess::Create();
79 } 79 }
80 return offscreen_context_for_compositor_thread_; 80 return offscreen_context_for_compositor_thread_;
81 } 81 }
82 82
83 private: 83 private:
84 SynchronousInputEventFilter synchronous_input_event_filter_; 84 SynchronousInputEventFilter synchronous_input_event_filter_;
85 scoped_refptr<cc::ContextProvider> offscreen_context_for_compositor_thread_; 85 scoped_refptr<cc::ContextProvider> offscreen_context_for_compositor_thread_;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 g_factory.Get(); // Ensure it's initialized. 243 g_factory.Get(); // Ensure it's initialized.
244 SynchronousCompositorImpl::CreateForWebContents(contents); 244 SynchronousCompositorImpl::CreateForWebContents(contents);
245 } 245 }
246 if (SynchronousCompositorImpl* instance = 246 if (SynchronousCompositorImpl* instance =
247 SynchronousCompositorImpl::FromWebContents(contents)) { 247 SynchronousCompositorImpl::FromWebContents(contents)) {
248 instance->SetClient(client); 248 instance->SetClient(client);
249 } 249 }
250 } 250 }
251 251
252 } // namespace content 252 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/edge_effect.cc ('k') | content/browser/android/surface_texture_peer_browser_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698