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

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

Issue 2027103002: Fix VulkanOutputSurface build error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 std::unique_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator_; 230 std::unique_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator_;
231 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source_; 231 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source_;
232 }; 232 };
233 233
234 #if defined(ENABLE_VULKAN) 234 #if defined(ENABLE_VULKAN)
235 class VulkanOutputSurface : public cc::OutputSurface { 235 class VulkanOutputSurface : public cc::OutputSurface {
236 public: 236 public:
237 VulkanOutputSurface( 237 VulkanOutputSurface(
238 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider, 238 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider,
239 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source) 239 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source)
240 : OutputSurface(nullptr, 240 : OutputSurface(std::move(vulkan_context_provider)),
241 nullptr,
242 std::move(vulkan_context_provider),
243 nullptr),
244 begin_frame_source_(std::move(begin_frame_source)) {} 241 begin_frame_source_(std::move(begin_frame_source)) {}
245 242
246 ~VulkanOutputSurface() override { Destroy(); } 243 ~VulkanOutputSurface() override { Destroy(); }
247 244
248 bool Initialize(gfx::AcceleratedWidget widget) { 245 bool Initialize(gfx::AcceleratedWidget widget) {
249 DCHECK(!surface_); 246 DCHECK(!surface_);
250 std::unique_ptr<gpu::VulkanSurface> surface( 247 std::unique_ptr<gpu::VulkanSurface> surface(
251 gpu::VulkanSurface::CreateViewSurface(widget)); 248 gpu::VulkanSurface::CreateViewSurface(widget));
252 if (!surface->Initialize(vulkan_context_provider()->GetDeviceQueue(), 249 if (!surface->Initialize(vulkan_context_provider()->GetDeviceQueue(),
253 gpu::VulkanSurface::DEFAULT_SURFACE_FORMAT)) { 250 gpu::VulkanSurface::DEFAULT_SURFACE_FORMAT)) {
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 void CompositorImpl::SetNeedsAnimate() { 799 void CompositorImpl::SetNeedsAnimate() {
803 needs_animate_ = true; 800 needs_animate_ = true;
804 if (!host_->visible()) 801 if (!host_->visible())
805 return; 802 return;
806 803
807 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); 804 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate");
808 host_->SetNeedsAnimate(); 805 host_->SetNeedsAnimate();
809 } 806 }
810 807
811 } // namespace content 808 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698