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

Unified Diff: gm/imagefromyuvtextures.cpp

Issue 1974983002: Refactor Vulkan image, texture, RTs so that create and getter handles match. (Closed) Base URL: https://skia.googlesource.com/skia.git@fixLayerVersion
Patch Set: nits Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/gpu/vk/GrVkTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefromyuvtextures.cpp
diff --git a/gm/imagefromyuvtextures.cpp b/gm/imagefromyuvtextures.cpp
index a34ec6e5138a50c44d798197db35bb751947ada2..5fa55da3883d184c98cd7aba65989f047f4abaae 100644
--- a/gm/imagefromyuvtextures.cpp
+++ b/gm/imagefromyuvtextures.cpp
@@ -129,8 +129,6 @@ protected:
return;
}
- GrBackendObject yuvHandles[3];
- this->createYUVTextures(context, yuvHandles);
static const SkScalar kPad = 10.f;
@@ -142,12 +140,14 @@ protected:
SkTArray<sk_sp<SkImage>> images;
images.push_back(fRGBImage);
for (int space = kJPEG_SkYUVColorSpace; space <= kLastEnum_SkYUVColorSpace; ++space) {
+ GrBackendObject yuvHandles[3];
+ this->createYUVTextures(context, yuvHandles);
images.push_back(SkImage::MakeFromYUVTexturesCopy(context,
static_cast<SkYUVColorSpace>(space),
yuvHandles, sizes,
kTopLeft_GrSurfaceOrigin));
+ this->deleteYUVTextures(context, yuvHandles);
}
- this->deleteYUVTextures(context, yuvHandles);
for (int i = 0; i < images.count(); ++ i) {
SkScalar y = (i + 1) * kPad + i * fYUVBmps[0].height();
SkScalar x = kPad;
« no previous file with comments | « no previous file | include/gpu/vk/GrVkTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698