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

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

Issue 2727583003: android: Comment to implement DidSwapBuffers for vulkan (Closed)
Patch Set: bug Created 3 years, 9 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 #include <unordered_set> 10 #include <unordered_set>
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 void CompositorImpl::CreateVulkanOutputSurface() { 629 void CompositorImpl::CreateVulkanOutputSurface() {
630 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 630 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
631 switches::kEnableVulkan)) 631 switches::kEnableVulkan))
632 return; 632 return;
633 633
634 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider = 634 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider =
635 GetSharedVulkanContextProvider(); 635 GetSharedVulkanContextProvider();
636 if (!vulkan_context_provider) 636 if (!vulkan_context_provider)
637 return; 637 return;
638 638
639 // TODO(crbug.com/582558): Need to match GL and implement DidSwapBuffers.
639 auto vulkan_surface = base::MakeUnique<VulkanOutputSurface>( 640 auto vulkan_surface = base::MakeUnique<VulkanOutputSurface>(
640 vulkan_context_provider, base::ThreadTaskRunnerHandle::Get()); 641 vulkan_context_provider, base::ThreadTaskRunnerHandle::Get());
641 if (!vulkan_surface->Initialize(window_)) 642 if (!vulkan_surface->Initialize(window_))
642 return; 643 return;
643 644
644 InitializeDisplay(std::move(vulkan_surface), 645 InitializeDisplay(std::move(vulkan_surface),
645 std::move(vulkan_context_provider), nullptr); 646 std::move(vulkan_context_provider), nullptr);
646 } 647 }
647 #endif 648 #endif
648 649
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 } 821 }
821 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, 822 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_,
822 frame_sink_id); 823 frame_sink_id);
823 } 824 }
824 825
825 bool CompositorImpl::HavePendingReadbacks() { 826 bool CompositorImpl::HavePendingReadbacks() {
826 return !readback_layer_tree_->children().empty(); 827 return !readback_layer_tree_->children().empty();
827 } 828 }
828 829
829 } // namespace content 830 } // 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