Skip to content

Commit

Permalink
Reland "Vulkan backed skia representation of SharedImageBackingAHB."
Browse files Browse the repository at this point in the history
This is a reland of 8dc8014
with a BUILD file fix.

Original change's description:
> Vulkan backed skia representation of SharedImageBackingAHB.
>
> 1. Implemented Vulkan backed skia representation of
> SharedImageBackingAHB.
> 2. Added synchronisation between gl backed and Vk backed
> representations.
>
> Bug: 891060
> Change-Id: I46ba32dea62569cd67d6f3b24559f4ef28307168
> Reviewed-on: https://chromium-review.googlesource.com/c/1370471
> Reviewed-by: Eric Karl <[email protected]>
> Commit-Queue: vikas soni <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#618320}

Bug: 891060
Change-Id: Ic8dc4572a27b8c40a6fcf7a021c3e2225e155691
Reviewed-on: https://chromium-review.googlesource.com/c/1388559
Commit-Queue: vikas soni <[email protected]>
Reviewed-by: Eric Karl <[email protected]>
Cr-Commit-Position: refs/heads/master@{#618771}
  • Loading branch information
vikaschromie authored and Commit Bot committed Dec 23, 2018
1 parent 143100a commit 0d62cdd
Show file tree
Hide file tree
Showing 9 changed files with 531 additions and 196 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void SkiaOutputSurfaceImplOnGpu::FulfillPromiseTexture(
shared_image_representation_factory_->ProduceSkia(
metadata.mailbox_holder.mailbox);
DCHECK(shared_image);
if (!shared_image->BeginReadAccess(backend_texture)) {
if (!shared_image->BeginReadAccess(sk_surface_.get(), backend_texture)) {
DLOG(ERROR)
<< "Failed to begin read access for SharedImageRepresentationSkia";
return;
Expand Down
40 changes: 26 additions & 14 deletions gpu/command_buffer/service/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//third_party/protobuf/proto_library.gni")
import("//gpu/vulkan/features.gni")
import("//third_party/protobuf/proto_library.gni")

group("service") {
if (is_component_build) {
Expand Down Expand Up @@ -258,15 +258,6 @@ target(link_target_type, "gles2_sources") {
"wrapped_sk_image.h",
]

if (is_android) {
sources += [
"ahardwarebuffer_utils.cc",
"ahardwarebuffer_utils.h",
"shared_image_backing_factory_ahardwarebuffer.cc",
"shared_image_backing_factory_ahardwarebuffer.h",
]
}

configs += [
"//build/config:precompiled_headers",
"//gpu:gpu_gles2_implementation",
Expand Down Expand Up @@ -322,10 +313,31 @@ target(link_target_type, "gles2_sources") {
]
}

if (is_android && !is_debug) {
# On Android optimize more since this component can be a bottleneck.
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
if (is_android) {
if (!is_debug) {
# On Android optimize more since this component can be a bottleneck.
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
sources += [
"ahardwarebuffer_utils.cc",
"ahardwarebuffer_utils.h",
"shared_image_backing_factory_ahardwarebuffer.cc",
"shared_image_backing_factory_ahardwarebuffer.h",
]

# TODO(cblume): http://crbug.com/911313
# Abstract out the platform specific defines. Right now we need the android
# platform specific define here to be able to include android specific
# functions.
defines = [ "VK_USE_PLATFORM_ANDROID_KHR" ]
deps += [ "//third_party/libsync" ]
if (enable_vulkan) {
deps += [
"//gpu/ipc/common:android_image_reader_utils",
"//gpu/vulkan:vulkan",
]
}
}
}

Expand Down
Loading

0 comments on commit 0d62cdd

Please sign in to comment.