aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-autoroll <android-autoroll@skia-corp.google.com.iam.gserviceaccount.com>2023-12-12 14:09:43 +0000
committerandroid-autoroll <android-autoroll@skia-corp.google.com.iam.gserviceaccount.com>2023-12-12 14:09:43 +0000
commit70f00a1dc410b64d8f24dde7f2ab42540c61fd50 (patch)
treee5b46e4b38bbcb2316464f919bf6533b43575af5
parent1a3997b3b612f9326a905bf42168c4e8697baad1 (diff)
parente1b4c6d9bc8d3e3b58a15099b68408a7a02e01ca (diff)
downloadskia-70f00a1dc410b64d8f24dde7f2ab42540c61fd50.tar.gz
Roll Skia from fe04635b125f to e1b4c6d9bc8d (1 revision)
https://skia.googlesource.com/skia.git/+log/fe04635b125f..e1b4c6d9bc8d 2023-12-12 robertphillips@google.com [graphite] Propagate Protectedness throughout Vulkan backend If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://skia-autoroll.corp.goog/r/android-master-autoroll Please CC djsollen@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Test: Presubmit checks will test this change. Exempt-From-Owner-Approval: The autoroll bot does not require owner approval. Bug: b/237108194 Bug: b/186777432 Change-Id: Ida8f4936eae77ba80a7fab605bd9673d19e930e8
-rw-r--r--METADATA2
-rw-r--r--src/gpu/graphite/AtlasProvider.cpp2
-rw-r--r--src/gpu/graphite/DrawAtlas.cpp2
-rw-r--r--src/gpu/graphite/RecorderPriv.h4
-rw-r--r--src/gpu/graphite/TextureUtils.cpp6
-rw-r--r--tools/window/GraphiteVulkanWindowContext.cpp12
6 files changed, 21 insertions, 7 deletions
diff --git a/METADATA b/METADATA
index c4490a33cc..3fd4dc7ab3 100644
--- a/METADATA
+++ b/METADATA
@@ -9,7 +9,7 @@ third_party {
type: GIT
value: "https://skia.googlesource.com/skia"
}
- version: "fe04635b125f29a98ac8a15decef3f6bf3eb9aa3"
+ version: "e1b4c6d9bc8d3e3b58a15099b68408a7a02e01ca"
license_type: RECIPROCAL
last_upgrade_date {
year: 2023
diff --git a/src/gpu/graphite/AtlasProvider.cpp b/src/gpu/graphite/AtlasProvider.cpp
index 389308d2c7..ca9bb1b2df 100644
--- a/src/gpu/graphite/AtlasProvider.cpp
+++ b/src/gpu/graphite/AtlasProvider.cpp
@@ -73,7 +73,7 @@ sk_sp<TextureProxy> AtlasProvider::getAtlasTexture(Recorder* recorder,
SkISize::Make(int32_t(width), int32_t(height)),
colorType,
skgpu::Mipmapped::kNo,
- skgpu::Protected::kNo,
+ recorder->priv().isProtected(),
skgpu::Renderable::kNo,
skgpu::Budgeted::kYes);
}
diff --git a/src/gpu/graphite/DrawAtlas.cpp b/src/gpu/graphite/DrawAtlas.cpp
index 52092be989..90cd2f68ca 100644
--- a/src/gpu/graphite/DrawAtlas.cpp
+++ b/src/gpu/graphite/DrawAtlas.cpp
@@ -476,7 +476,7 @@ bool DrawAtlas::activateNewPage(Recorder* recorder) {
const Caps* caps = recorder->priv().caps();
auto textureInfo = caps->getDefaultSampledTextureInfo(fColorType,
/*mipmapped=*/Mipmapped::kNo,
- Protected::kNo,
+ recorder->priv().isProtected(),
Renderable::kNo);
fProxies[fNumActivePages] = TextureProxy::Make(
caps, {fTextureWidth, fTextureHeight}, textureInfo, skgpu::Budgeted::kYes);
diff --git a/src/gpu/graphite/RecorderPriv.h b/src/gpu/graphite/RecorderPriv.h
index 820e0d7586..a7eb7e12da 100644
--- a/src/gpu/graphite/RecorderPriv.h
+++ b/src/gpu/graphite/RecorderPriv.h
@@ -49,6 +49,10 @@ public:
return fRecorder->fSharedContext->rendererProvider();
}
+ Protected isProtected() const {
+ return fRecorder->fSharedContext->isProtected();
+ }
+
UniformDataCache* uniformDataCache() { return fRecorder->fUniformDataCache.get(); }
TextureDataCache* textureDataCache() { return fRecorder->fTextureDataCache.get(); }
DrawBufferManager* drawBufferManager() { return fRecorder->fDrawBufferManager.get(); }
diff --git a/src/gpu/graphite/TextureUtils.cpp b/src/gpu/graphite/TextureUtils.cpp
index 8b6d9a8cad..aeb439b369 100644
--- a/src/gpu/graphite/TextureUtils.cpp
+++ b/src/gpu/graphite/TextureUtils.cpp
@@ -95,6 +95,7 @@ sk_sp<SkSpecialImage> eval_blur(skgpu::graphite::Recorder* recorder,
const SkSurfaceProps& outProps) {
SkImageInfo outII = SkImageInfo::Make({dstRect.width(), dstRect.height()},
colorType, kPremul_SkAlphaType, std::move(outCS));
+ // Protected-ness is pulled off of the recorder
auto device = skgpu::graphite::Device::Make(recorder,
outII,
skgpu::Budgeted::kYes,
@@ -313,11 +314,12 @@ std::tuple<TextureProxyView, SkColorType> MakeBitmapProxyView(Recorder* recorder
mipmapped = Mipmapped::kNo;
}
- auto textureInfo = caps->getDefaultSampledTextureInfo(ct, mipmapped, Protected::kNo,
+ Protected isProtected = recorder->priv().isProtected();
+ auto textureInfo = caps->getDefaultSampledTextureInfo(ct, mipmapped, isProtected,
Renderable::kNo);
if (!textureInfo.isValid()) {
ct = kRGBA_8888_SkColorType;
- textureInfo = caps->getDefaultSampledTextureInfo(ct, mipmapped, Protected::kNo,
+ textureInfo = caps->getDefaultSampledTextureInfo(ct, mipmapped, isProtected,
Renderable::kNo);
}
SkASSERT(textureInfo.isValid());
diff --git a/tools/window/GraphiteVulkanWindowContext.cpp b/tools/window/GraphiteVulkanWindowContext.cpp
index 2a8f99fcba..72ba8820f8 100644
--- a/tools/window/GraphiteVulkanWindowContext.cpp
+++ b/tools/window/GraphiteVulkanWindowContext.cpp
@@ -67,7 +67,8 @@ void GraphiteVulkanWindowContext::initializeContext() {
VkPhysicalDeviceFeatures2 features;
if (!sk_gpu_test::CreateVkBackendContext(getInstanceProc, &backendContext, &extensions,
&features, &fDebugCallback, &fPresentQueueIndex,
- fCanPresentFn)) {
+ fCanPresentFn,
+ fDisplayParams.fCreateProtectedNativeBackend)) {
sk_gpu_test::FreeVulkanFeaturesStructs(&features);
return;
}
@@ -293,6 +294,9 @@ bool GraphiteVulkanWindowContext::createSwapchain(int width, int height,
VkSwapchainCreateInfoKHR swapchainCreateInfo;
memset(&swapchainCreateInfo, 0, sizeof(VkSwapchainCreateInfoKHR));
swapchainCreateInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
+ swapchainCreateInfo.flags = fDisplayParams.fCreateProtectedNativeBackend
+ ? VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR
+ : 0;
swapchainCreateInfo.surface = fSurface;
swapchainCreateInfo.minImageCount = imageCount;
swapchainCreateInfo.imageFormat = surfaceFormat;
@@ -346,7 +350,8 @@ bool GraphiteVulkanWindowContext::createSwapchain(int width, int height,
return true;
}
-bool GraphiteVulkanWindowContext::createBuffers(VkFormat format, VkImageUsageFlags usageFlags,
+bool GraphiteVulkanWindowContext::createBuffers(VkFormat format,
+ VkImageUsageFlags usageFlags,
SkColorType colorType,
VkSharingMode sharingMode) {
fGetSwapchainImagesKHR(fDevice, fSwapchain, &fImageCount, nullptr);
@@ -365,6 +370,8 @@ bool GraphiteVulkanWindowContext::createBuffers(VkFormat format, VkImageUsageFla
info.fFormat = format;
info.fImageUsageFlags = usageFlags;
info.fSharingMode = sharingMode;
+ info.fFlags = fDisplayParams.fCreateProtectedNativeBackend ? VK_IMAGE_CREATE_PROTECTED_BIT
+ : 0;
skgpu::graphite::BackendTexture backendTex(this->dimensions(),
info,
@@ -372,6 +379,7 @@ bool GraphiteVulkanWindowContext::createBuffers(VkFormat format, VkImageUsageFla
fPresentQueueIndex,
fImages[i],
skgpu::VulkanAlloc());
+
fSurfaces[i] = SkSurfaces::WrapBackendTexture(this->graphiteRecorder(),
backendTex,
colorType,