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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. Created 4 years, 7 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 | « content/browser/media/webrtc/webrtc_internals.cc ('k') | content/child/child_thread_impl.cc » ('j') | 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/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 return allocator; 341 return allocator;
342 } 342 }
343 343
344 // static 344 // static
345 scoped_refptr<cc::VulkanInProcessContextProvider> 345 scoped_refptr<cc::VulkanInProcessContextProvider>
346 CompositorImpl::SharedVulkanContextProviderAndroid() { 346 CompositorImpl::SharedVulkanContextProviderAndroid() {
347 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 347 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
348 switches::kEnableVulkan)) { 348 switches::kEnableVulkan)) {
349 scoped_refptr<cc::VulkanInProcessContextProvider>* context_provider = 349 scoped_refptr<cc::VulkanInProcessContextProvider>* context_provider =
350 g_shared_vulkan_context_provider_android_.Pointer(); 350 g_shared_vulkan_context_provider_android_.Pointer();
351 if (*context_provider == NULL) 351 if (!*context_provider)
352 *context_provider = cc::VulkanInProcessContextProvider::Create(); 352 *context_provider = cc::VulkanInProcessContextProvider::Create();
353 return *context_provider; 353 return *context_provider;
354 } 354 }
355 return nullptr; 355 return nullptr;
356 } 356 }
357 357
358 CompositorImpl::CompositorImpl(CompositorClient* client, 358 CompositorImpl::CompositorImpl(CompositorClient* client,
359 gfx::NativeWindow root_window) 359 gfx::NativeWindow root_window)
360 : root_layer_(cc::Layer::Create()), 360 : root_layer_(cc::Layer::Create()),
361 surface_id_allocator_(CreateSurfaceIdAllocator()), 361 surface_id_allocator_(CreateSurfaceIdAllocator()),
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 void CompositorImpl::SetNeedsAnimate() { 787 void CompositorImpl::SetNeedsAnimate() {
788 needs_animate_ = true; 788 needs_animate_ = true;
789 if (!host_->visible()) 789 if (!host_->visible())
790 return; 790 return;
791 791
792 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); 792 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate");
793 host_->SetNeedsAnimate(); 793 host_->SetNeedsAnimate();
794 } 794 }
795 795
796 } // namespace content 796 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/webrtc/webrtc_internals.cc ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698