| 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/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 #include <unordered_set> | 10 #include <unordered_set> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "base/threading/thread_checker.h" | 29 #include "base/threading/thread_checker.h" |
| 30 #include "base/threading/thread_task_runner_handle.h" | 30 #include "base/threading/thread_task_runner_handle.h" |
| 31 #include "cc/animation/animation_host.h" | 31 #include "cc/animation/animation_host.h" |
| 32 #include "cc/base/switches.h" | 32 #include "cc/base/switches.h" |
| 33 #include "cc/input/input_handler.h" | 33 #include "cc/input/input_handler.h" |
| 34 #include "cc/layers/layer.h" | 34 #include "cc/layers/layer.h" |
| 35 #include "cc/output/compositor_frame.h" | 35 #include "cc/output/compositor_frame.h" |
| 36 #include "cc/output/context_provider.h" | 36 #include "cc/output/context_provider.h" |
| 37 #include "cc/output/output_surface.h" | 37 #include "cc/output/output_surface.h" |
| 38 #include "cc/output/output_surface_client.h" | 38 #include "cc/output/output_surface_client.h" |
| 39 #include "cc/output/texture_mailbox_deleter.h" |
| 39 #include "cc/output/vulkan_in_process_context_provider.h" | 40 #include "cc/output/vulkan_in_process_context_provider.h" |
| 40 #include "cc/raster/single_thread_task_graph_runner.h" | 41 #include "cc/raster/single_thread_task_graph_runner.h" |
| 41 #include "cc/scheduler/begin_frame_source.h" | 42 #include "cc/scheduler/begin_frame_source.h" |
| 42 #include "cc/surfaces/display.h" | 43 #include "cc/surfaces/display.h" |
| 44 #include "cc/surfaces/display_scheduler.h" |
| 43 #include "cc/surfaces/surface_display_output_surface.h" | 45 #include "cc/surfaces/surface_display_output_surface.h" |
| 44 #include "cc/surfaces/surface_id_allocator.h" | 46 #include "cc/surfaces/surface_id_allocator.h" |
| 45 #include "cc/surfaces/surface_manager.h" | 47 #include "cc/surfaces/surface_manager.h" |
| 46 #include "cc/trees/layer_tree_host.h" | 48 #include "cc/trees/layer_tree_host.h" |
| 47 #include "cc/trees/layer_tree_settings.h" | 49 #include "cc/trees/layer_tree_settings.h" |
| 48 #include "components/display_compositor/compositor_overlay_candidate_validator_a
ndroid.h" | 50 #include "components/display_compositor/compositor_overlay_candidate_validator_a
ndroid.h" |
| 49 #include "components/display_compositor/gl_helper.h" | 51 #include "components/display_compositor/gl_helper.h" |
| 50 #include "content/browser/android/child_process_launcher_android.h" | 52 #include "content/browser/android/child_process_launcher_android.h" |
| 51 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 53 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 52 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 54 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 base::TimeTicks deadline = std::max(base::TimeTicks::Now(), frame_time); | 147 base::TimeTicks deadline = std::max(base::TimeTicks::Now(), frame_time); |
| 146 last_begin_frame_args_ = | 148 last_begin_frame_args_ = |
| 147 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, | 149 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, |
| 148 vsync_period, cc::BeginFrameArgs::NORMAL); | 150 vsync_period, cc::BeginFrameArgs::NORMAL); |
| 149 std::unordered_set<cc::BeginFrameObserver*> observers(observers_); | 151 std::unordered_set<cc::BeginFrameObserver*> observers(observers_); |
| 150 for (auto* obs : observers) | 152 for (auto* obs : observers) |
| 151 obs->OnBeginFrame(last_begin_frame_args_); | 153 obs->OnBeginFrame(last_begin_frame_args_); |
| 152 } | 154 } |
| 153 | 155 |
| 154 // Used to override capabilities_.adjust_deadline_for_parent to false | 156 // Used to override capabilities_.adjust_deadline_for_parent to false |
| 155 class OutputSurfaceWithoutParent : public cc::OutputSurface, | 157 class OutputSurfaceWithoutParent : public cc::OutputSurface { |
| 156 public CompositorImpl::VSyncObserver { | |
| 157 public: | 158 public: |
| 158 OutputSurfaceWithoutParent( | 159 OutputSurfaceWithoutParent( |
| 159 CompositorImpl* compositor, | |
| 160 scoped_refptr<ContextProviderCommandBuffer> context_provider, | 160 scoped_refptr<ContextProviderCommandBuffer> context_provider, |
| 161 const base::Callback<void(gpu::Capabilities)>& | 161 const base::Callback<void(gpu::Capabilities)>& |
| 162 populate_gpu_capabilities_callback, | 162 populate_gpu_capabilities_callback) |
| 163 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source) | |
| 164 : cc::OutputSurface(std::move(context_provider), nullptr, nullptr), | 163 : cc::OutputSurface(std::move(context_provider), nullptr, nullptr), |
| 165 compositor_(compositor), | |
| 166 populate_gpu_capabilities_callback_(populate_gpu_capabilities_callback), | 164 populate_gpu_capabilities_callback_(populate_gpu_capabilities_callback), |
| 167 swap_buffers_completion_callback_( | 165 swap_buffers_completion_callback_( |
| 168 base::Bind(&OutputSurfaceWithoutParent::OnSwapBuffersCompleted, | 166 base::Bind(&OutputSurfaceWithoutParent::OnSwapBuffersCompleted, |
| 169 base::Unretained(this))), | 167 base::Unretained(this))), |
| 170 overlay_candidate_validator_( | 168 overlay_candidate_validator_( |
| 171 new display_compositor:: | 169 new display_compositor:: |
| 172 CompositorOverlayCandidateValidatorAndroid()), | 170 CompositorOverlayCandidateValidatorAndroid()) { |
| 173 begin_frame_source_(std::move(begin_frame_source)) { | |
| 174 capabilities_.adjust_deadline_for_parent = false; | 171 capabilities_.adjust_deadline_for_parent = false; |
| 175 capabilities_.max_frames_pending = kMaxDisplaySwapBuffers; | 172 capabilities_.max_frames_pending = kMaxDisplaySwapBuffers; |
| 176 } | 173 } |
| 177 | 174 |
| 178 ~OutputSurfaceWithoutParent() override { compositor_->RemoveObserver(this); } | 175 ~OutputSurfaceWithoutParent() override = default; |
| 179 | 176 |
| 180 void SwapBuffers(cc::CompositorFrame* frame) override { | 177 void SwapBuffers(cc::CompositorFrame* frame) override { |
| 181 GetCommandBufferProxy()->SetLatencyInfo(frame->metadata.latency_info); | 178 GetCommandBufferProxy()->SetLatencyInfo(frame->metadata.latency_info); |
| 182 if (frame->gl_frame_data->sub_buffer_rect.IsEmpty()) { | 179 if (frame->gl_frame_data->sub_buffer_rect.IsEmpty()) { |
| 183 context_provider_->ContextSupport()->CommitOverlayPlanes(); | 180 context_provider_->ContextSupport()->CommitOverlayPlanes(); |
| 184 } else { | 181 } else { |
| 185 DCHECK(frame->gl_frame_data->sub_buffer_rect == | 182 DCHECK(frame->gl_frame_data->sub_buffer_rect == |
| 186 gfx::Rect(frame->gl_frame_data->size)); | 183 gfx::Rect(frame->gl_frame_data->size)); |
| 187 context_provider_->ContextSupport()->Swap(); | 184 context_provider_->ContextSupport()->Swap(); |
| 188 } | 185 } |
| 189 client_->DidSwapBuffers(); | 186 client_->DidSwapBuffers(); |
| 190 } | 187 } |
| 191 | 188 |
| 192 bool BindToClient(cc::OutputSurfaceClient* client) override { | 189 bool BindToClient(cc::OutputSurfaceClient* client) override { |
| 193 if (!OutputSurface::BindToClient(client)) | 190 if (!OutputSurface::BindToClient(client)) |
| 194 return false; | 191 return false; |
| 195 | 192 |
| 196 GetCommandBufferProxy()->SetSwapBuffersCompletionCallback( | 193 GetCommandBufferProxy()->SetSwapBuffersCompletionCallback( |
| 197 swap_buffers_completion_callback_.callback()); | 194 swap_buffers_completion_callback_.callback()); |
| 198 | 195 |
| 199 populate_gpu_capabilities_callback_.Run( | 196 populate_gpu_capabilities_callback_.Run( |
| 200 context_provider_->ContextCapabilities()); | 197 context_provider_->ContextCapabilities()); |
| 201 compositor_->AddObserver(this); | |
| 202 | |
| 203 client->SetBeginFrameSource(begin_frame_source_.get()); | |
| 204 | |
| 205 return true; | 198 return true; |
| 206 } | 199 } |
| 207 | 200 |
| 208 void DetachFromClient() override { | |
| 209 client_->SetBeginFrameSource(nullptr); | |
| 210 OutputSurface::DetachFromClient(); | |
| 211 } | |
| 212 | |
| 213 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override { | 201 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override { |
| 214 return overlay_candidate_validator_.get(); | 202 return overlay_candidate_validator_.get(); |
| 215 } | 203 } |
| 216 | 204 |
| 217 private: | 205 private: |
| 218 gpu::CommandBufferProxyImpl* GetCommandBufferProxy() { | 206 gpu::CommandBufferProxyImpl* GetCommandBufferProxy() { |
| 219 ContextProviderCommandBuffer* provider_command_buffer = | 207 ContextProviderCommandBuffer* provider_command_buffer = |
| 220 static_cast<content::ContextProviderCommandBuffer*>( | 208 static_cast<content::ContextProviderCommandBuffer*>( |
| 221 context_provider_.get()); | 209 context_provider_.get()); |
| 222 gpu::CommandBufferProxyImpl* command_buffer_proxy = | 210 gpu::CommandBufferProxyImpl* command_buffer_proxy = |
| 223 provider_command_buffer->GetCommandBufferProxy(); | 211 provider_command_buffer->GetCommandBufferProxy(); |
| 224 DCHECK(command_buffer_proxy); | 212 DCHECK(command_buffer_proxy); |
| 225 return command_buffer_proxy; | 213 return command_buffer_proxy; |
| 226 } | 214 } |
| 227 | 215 |
| 228 void OnSwapBuffersCompleted( | 216 void OnSwapBuffersCompleted( |
| 229 const std::vector<ui::LatencyInfo>& latency_info, | 217 const std::vector<ui::LatencyInfo>& latency_info, |
| 230 gfx::SwapResult result, | 218 gfx::SwapResult result, |
| 231 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) { | 219 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) { |
| 232 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); | 220 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); |
| 233 OutputSurface::OnSwapBuffersComplete(); | 221 OutputSurface::OnSwapBuffersComplete(); |
| 234 } | 222 } |
| 235 | 223 |
| 236 void OnVSync(base::TimeTicks timebase, base::TimeDelta interval) override { | |
| 237 client_->CommitVSyncParameters(timebase, interval); | |
| 238 } | |
| 239 | |
| 240 private: | 224 private: |
| 241 CompositorImpl* compositor_; | |
| 242 base::Callback<void(gpu::Capabilities)> populate_gpu_capabilities_callback_; | 225 base::Callback<void(gpu::Capabilities)> populate_gpu_capabilities_callback_; |
| 243 base::CancelableCallback<void( | 226 base::CancelableCallback<void( |
| 244 const std::vector<ui::LatencyInfo>&, | 227 const std::vector<ui::LatencyInfo>&, |
| 245 gfx::SwapResult, | 228 gfx::SwapResult, |
| 246 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac)> | 229 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac)> |
| 247 swap_buffers_completion_callback_; | 230 swap_buffers_completion_callback_; |
| 248 std::unique_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator_; | 231 std::unique_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator_; |
| 249 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source_; | |
| 250 }; | 232 }; |
| 251 | 233 |
| 252 #if defined(ENABLE_VULKAN) | 234 #if defined(ENABLE_VULKAN) |
| 253 class VulkanOutputSurface : public cc::OutputSurface { | 235 class VulkanOutputSurface : public cc::OutputSurface { |
| 254 public: | 236 public: |
| 255 VulkanOutputSurface( | 237 explicit VulkanOutputSurface( |
| 256 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider, | 238 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider) |
| 257 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source) | 239 : OutputSurface(std::move(vulkan_context_provider)) {} |
| 258 : OutputSurface(std::move(vulkan_context_provider)), | |
| 259 begin_frame_source_(std::move(begin_frame_source)) {} | |
| 260 | 240 |
| 261 ~VulkanOutputSurface() override { Destroy(); } | 241 ~VulkanOutputSurface() override { Destroy(); } |
| 262 | 242 |
| 263 bool Initialize(gfx::AcceleratedWidget widget) { | 243 bool Initialize(gfx::AcceleratedWidget widget) { |
| 264 DCHECK(!surface_); | 244 DCHECK(!surface_); |
| 265 std::unique_ptr<gpu::VulkanSurface> surface( | 245 std::unique_ptr<gpu::VulkanSurface> surface( |
| 266 gpu::VulkanSurface::CreateViewSurface(widget)); | 246 gpu::VulkanSurface::CreateViewSurface(widget)); |
| 267 if (!surface->Initialize(vulkan_context_provider()->GetDeviceQueue(), | 247 if (!surface->Initialize(vulkan_context_provider()->GetDeviceQueue(), |
| 268 gpu::VulkanSurface::DEFAULT_SURFACE_FORMAT)) { | 248 gpu::VulkanSurface::DEFAULT_SURFACE_FORMAT)) { |
| 269 return false; | 249 return false; |
| 270 } | 250 } |
| 271 surface_ = std::move(surface); | 251 surface_ = std::move(surface); |
| 272 | 252 |
| 273 return true; | 253 return true; |
| 274 } | 254 } |
| 275 | 255 |
| 276 bool BindToClient(cc::OutputSurfaceClient* client) override { | 256 bool BindToClient(cc::OutputSurfaceClient* client) override { |
| 277 if (!OutputSurface::BindToClient(client)) | 257 if (!OutputSurface::BindToClient(client)) |
| 278 return false; | 258 return false; |
| 279 client->SetBeginFrameSource(begin_frame_source_.get()); | |
| 280 return true; | 259 return true; |
| 281 } | 260 } |
| 282 | 261 |
| 283 void SwapBuffers(cc::CompositorFrame* frame) override { | 262 void SwapBuffers(cc::CompositorFrame* frame) override { |
| 284 surface_->SwapBuffers(); | 263 surface_->SwapBuffers(); |
| 285 PostSwapBuffersComplete(); | 264 PostSwapBuffersComplete(); |
| 286 client_->DidSwapBuffers(); | 265 client_->DidSwapBuffers(); |
| 287 } | 266 } |
| 288 | 267 |
| 289 void Destroy() { | 268 void Destroy() { |
| 290 if (surface_) { | 269 if (surface_) { |
| 291 surface_->Destroy(); | 270 surface_->Destroy(); |
| 292 surface_.reset(); | 271 surface_.reset(); |
| 293 } | 272 } |
| 294 } | 273 } |
| 295 | 274 |
| 296 void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info, | 275 void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info, |
| 297 gfx::SwapResult result) { | 276 gfx::SwapResult result) { |
| 298 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); | 277 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); |
| 299 OutputSurface::OnSwapBuffersComplete(); | 278 OutputSurface::OnSwapBuffersComplete(); |
| 300 } | 279 } |
| 301 | 280 |
| 302 private: | 281 private: |
| 303 std::unique_ptr<gpu::VulkanSurface> surface_; | 282 std::unique_ptr<gpu::VulkanSurface> surface_; |
| 304 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source_; | |
| 305 | 283 |
| 306 DISALLOW_COPY_AND_ASSIGN(VulkanOutputSurface); | 284 DISALLOW_COPY_AND_ASSIGN(VulkanOutputSurface); |
| 307 }; | 285 }; |
| 308 #endif | 286 #endif |
| 309 | 287 |
| 310 base::LazyInstance<scoped_refptr<cc::VulkanInProcessContextProvider>> | 288 base::LazyInstance<scoped_refptr<cc::VulkanInProcessContextProvider>> |
| 311 g_shared_vulkan_context_provider_android_ = LAZY_INSTANCE_INITIALIZER; | 289 g_shared_vulkan_context_provider_android_ = LAZY_INSTANCE_INITIALIZER; |
| 312 | 290 |
| 313 static bool g_initialized = false; | 291 static bool g_initialized = false; |
| 314 | 292 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 if (!output_surface_request_pending_ || !host_->visible()) | 589 if (!output_surface_request_pending_ || !host_->visible()) |
| 612 return; | 590 return; |
| 613 | 591 |
| 614 scoped_refptr<ContextProviderCommandBuffer> context_provider; | 592 scoped_refptr<ContextProviderCommandBuffer> context_provider; |
| 615 scoped_refptr<cc::VulkanInProcessContextProvider> vulkan_context_provider = | 593 scoped_refptr<cc::VulkanInProcessContextProvider> vulkan_context_provider = |
| 616 SharedVulkanContextProviderAndroid(); | 594 SharedVulkanContextProviderAndroid(); |
| 617 std::unique_ptr<cc::OutputSurface> display_output_surface; | 595 std::unique_ptr<cc::OutputSurface> display_output_surface; |
| 618 #if defined(ENABLE_VULKAN) | 596 #if defined(ENABLE_VULKAN) |
| 619 std::unique_ptr<VulkanOutputSurface> vulkan_surface; | 597 std::unique_ptr<VulkanOutputSurface> vulkan_surface; |
| 620 if (vulkan_context_provider) { | 598 if (vulkan_context_provider) { |
| 621 vulkan_surface.reset(new VulkanOutputSurface( | 599 vulkan_surface.reset( |
| 622 std::move(vulkan_context_provider), | 600 new VulkanOutputSurface(std::move(vulkan_context_provider))); |
| 623 base::WrapUnique(new ExternalBeginFrameSource(this)))); | |
| 624 if (!vulkan_surface->Initialize(window_)) { | 601 if (!vulkan_surface->Initialize(window_)) { |
| 625 vulkan_surface->Destroy(); | 602 vulkan_surface->Destroy(); |
| 626 vulkan_surface.reset(); | 603 vulkan_surface.reset(); |
| 627 } else { | 604 } else { |
| 628 display_output_surface = std::move(vulkan_surface); | 605 display_output_surface = std::move(vulkan_surface); |
| 629 } | 606 } |
| 630 } | 607 } |
| 631 #endif | 608 #endif |
| 632 | 609 |
| 633 if (!display_output_surface) { | 610 if (!display_output_surface) { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 | 679 |
| 703 context_provider = new ContextProviderCommandBuffer( | 680 context_provider = new ContextProviderCommandBuffer( |
| 704 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, | 681 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, |
| 705 gpu::GpuStreamPriority::NORMAL, surface_handle_, url, | 682 gpu::GpuStreamPriority::NORMAL, surface_handle_, url, |
| 706 gl::PreferIntegratedGpu, automatic_flushes, support_locking, limits, | 683 gl::PreferIntegratedGpu, automatic_flushes, support_locking, limits, |
| 707 attributes, nullptr, | 684 attributes, nullptr, |
| 708 command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); | 685 command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); |
| 709 DCHECK(context_provider.get()); | 686 DCHECK(context_provider.get()); |
| 710 | 687 |
| 711 display_output_surface = base::WrapUnique(new OutputSurfaceWithoutParent( | 688 display_output_surface = base::WrapUnique(new OutputSurfaceWithoutParent( |
| 712 this, context_provider, | 689 context_provider, base::Bind(&CompositorImpl::PopulateGpuCapabilities, |
| 713 base::Bind(&CompositorImpl::PopulateGpuCapabilities, | 690 base::Unretained(this)))); |
| 714 base::Unretained(this)), | |
| 715 base::WrapUnique(new ExternalBeginFrameSource(this)))); | |
| 716 } | 691 } |
| 717 | 692 |
| 718 cc::SurfaceManager* manager = GetSurfaceManager(); | 693 cc::SurfaceManager* manager = GetSurfaceManager(); |
| 719 display_.reset(new cc::Display(manager, HostSharedBitmapManager::current(), | 694 auto* task_runner = base::ThreadTaskRunnerHandle::Get().get(); |
| 720 BrowserGpuMemoryBufferManager::current(), | 695 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source( |
| 721 host_->settings().renderer_settings, | 696 new ExternalBeginFrameSource(this)); |
| 722 surface_id_allocator_->id_namespace(), | 697 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( |
| 723 base::ThreadTaskRunnerHandle::Get().get(), | 698 begin_frame_source.get(), task_runner, |
| 724 std::move(display_output_surface))); | 699 display_output_surface->capabilities().max_frames_pending)); |
| 700 |
| 701 display_.reset(new cc::Display( |
| 702 manager, HostSharedBitmapManager::current(), |
| 703 BrowserGpuMemoryBufferManager::current(), |
| 704 host_->settings().renderer_settings, |
| 705 surface_id_allocator_->id_namespace(), std::move(begin_frame_source), |
| 706 std::move(display_output_surface), std::move(scheduler), |
| 707 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner))); |
| 725 | 708 |
| 726 std::unique_ptr<cc::SurfaceDisplayOutputSurface> delegated_output_surface( | 709 std::unique_ptr<cc::SurfaceDisplayOutputSurface> delegated_output_surface( |
| 727 vulkan_context_provider | 710 vulkan_context_provider |
| 728 ? new cc::SurfaceDisplayOutputSurface( | 711 ? new cc::SurfaceDisplayOutputSurface( |
| 729 manager, surface_id_allocator_.get(), display_.get(), | 712 manager, surface_id_allocator_.get(), display_.get(), |
| 730 static_cast<scoped_refptr<cc::VulkanContextProvider>>( | 713 static_cast<scoped_refptr<cc::VulkanContextProvider>>( |
| 731 vulkan_context_provider)) | 714 vulkan_context_provider)) |
| 732 : new cc::SurfaceDisplayOutputSurface( | 715 : new cc::SurfaceDisplayOutputSurface( |
| 733 manager, surface_id_allocator_.get(), display_.get(), | 716 manager, surface_id_allocator_.get(), display_.get(), |
| 734 context_provider, nullptr)); | 717 context_provider, nullptr)); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 void CompositorImpl::SetNeedsAnimate() { | 799 void CompositorImpl::SetNeedsAnimate() { |
| 817 needs_animate_ = true; | 800 needs_animate_ = true; |
| 818 if (!host_->visible()) | 801 if (!host_->visible()) |
| 819 return; | 802 return; |
| 820 | 803 |
| 821 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); | 804 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); |
| 822 host_->SetNeedsAnimate(); | 805 host_->SetNeedsAnimate(); |
| 823 } | 806 } |
| 824 | 807 |
| 825 } // namespace content | 808 } // namespace content |
| OLD | NEW |