aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-02-23 17:06:10 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-24 16:09:33 +0000
commit9ad1f92e2fceea33215c0f13cee42a679fb88d44 (patch)
treef44afa1066b401ae5e3cf189078ff6fceaccca78 /gn
parent20de615e3d02ff52c9a3c319ce35bcaace97be25 (diff)
Add GrExternalTextureData and SkCrossContextImageData
GrExternalTextureData is an API for exporting the backend-specific information about a texture in a type-safe way, and without pointing into the GrTexture. The new detachBackendTexture API lets us release ownership of a texture to the client. SkCrossContextImageData is the public API that lets clients upload textures on one thread/GrContext, then safely transfer ownership to another thread and GrContext for rendering. Only GL is implemented/supported right now. Vulkan support requires that we add thread-safe memory pools, or otherwise transfer the actual memory block containing the texture to the new context. BUG=skia: Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca Reviewed-on: https://skia-review.googlesource.com/8529 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'gn')
-rw-r--r--gn/core.gni1
-rw-r--r--gn/gpu.gni1
-rw-r--r--gn/tests.gni1
3 files changed, 3 insertions, 0 deletions
diff --git a/gn/core.gni b/gn/core.gni
index b6ad6a9960..7dd997ed05 100644
--- a/gn/core.gni
+++ b/gn/core.gni
@@ -390,6 +390,7 @@ skia_core_sources = [
"$_include/core/SkColor.h",
"$_include/core/SkColorFilter.h",
"$_include/core/SkColorPriv.h",
+ "$_include/core/SkCrossContextImageData.h",
"$_include/core/SkData.h",
"$_include/core/SkDeque.h",
"$_include/core/SkDrawable.h",
diff --git a/gn/gpu.gni b/gn/gpu.gni
index ae05f2cb31..f3e479d1dc 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -18,6 +18,7 @@ skia_gpu_sources = [
"$_include/gpu/GrContextOptions.h",
"$_include/gpu/GrContext.h",
"$_include/gpu/GrCoordTransform.h",
+ "$_include/gpu/GrExternalTextureData.h",
"$_include/gpu/GrFragmentProcessor.h",
"$_include/gpu/GrGpuResource.h",
"$_include/gpu/GrPaint.h",
diff --git a/gn/tests.gni b/gn/tests.gni
index 6646f3df5a..f8c95d79de 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -44,6 +44,7 @@ tests_sources = [
"$_tests/ColorTest.cpp",
"$_tests/CopySurfaceTest.cpp",
"$_tests/CPlusPlusEleven.cpp",
+ "$_tests/CrossContextImageTest.cpp",
"$_tests/CTest.cpp",
"$_tests/DashPathEffectTest.cpp",
"$_tests/DataRefTest.cpp",