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

Unified Diff: gm/imagefromyuvtextures.cpp

Issue 1429863009: Use a struct for client GL texture handles (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 1 month 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 | gyp/skia_for_android_framework_defines.gypi » ('j') | include/gpu/gl/GrGLTypes.h » ('J')
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 8c8ab24ad4f1c401f2b7b4c691ce663bcdd9571d..28d2cf84c56bd74d989d3ac7174d7fc88f69ef7d 100644
--- a/gm/imagefromyuvtextures.cpp
+++ b/gm/imagefromyuvtextures.cpp
@@ -93,7 +93,7 @@ protected:
fRGBImage.reset(SkImage::NewRasterCopy(rgbBmp.info(), rgbColors, rgbBmp.rowBytes()));
}
- void createYUVTextures(GrContext* context, GrBackendObject yuvIDs[3]) {
+ void createYUVTextures(GrContext* context, GrBackendObject yuvHandles[3]) {
const GrGpu* gpu = context->getGpu();
if (!gpu) {
return;
@@ -101,15 +101,15 @@ protected:
for (int i = 0; i < 3; ++i) {
SkASSERT(fYUVBmps[i].width() == SkToInt(fYUVBmps[i].rowBytes()));
- yuvIDs[i] = gpu->createTestingOnlyBackendTexture(fYUVBmps[i].getPixels(),
- fYUVBmps[i].width(),
- fYUVBmps[i].height(),
- kAlpha_8_GrPixelConfig);
+ yuvHandles[i] = gpu->createTestingOnlyBackendTexture(fYUVBmps[i].getPixels(),
+ fYUVBmps[i].width(),
+ fYUVBmps[i].height(),
+ kAlpha_8_GrPixelConfig);
}
context->resetContext();
}
- void deleteYUVTextures(GrContext* context, const GrBackendObject yuvIDs[3]) {
+ void deleteYUVTextures(GrContext* context, const GrBackendObject yuvHandles[3]) {
const GrGpu* gpu = context->getGpu();
if (!gpu) {
@@ -117,7 +117,7 @@ protected:
}
for (int i = 0; i < 3; ++i) {
- gpu->deleteTestingOnlyBackendTexture(yuvIDs[i]);
+ gpu->deleteTestingOnlyBackendTexture(yuvHandles[i]);
}
context->resetContext();
@@ -131,8 +131,8 @@ protected:
return;
}
- GrBackendObject yuvIDs[3];
- this->createYUVTextures(context, yuvIDs);
+ GrBackendObject yuvHandles[3];
+ this->createYUVTextures(context, yuvHandles);
static const SkScalar kPad = 10.f;
@@ -146,10 +146,10 @@ protected:
for (int space = kJPEG_SkYUVColorSpace; space <= kLastEnum_SkYUVColorSpace; ++space) {
images.push_back(SkImage::NewFromYUVTexturesCopy(context,
static_cast<SkYUVColorSpace>(space),
- yuvIDs, sizes,
+ yuvHandles, sizes,
kTopLeft_GrSurfaceOrigin));
}
- this->deleteYUVTextures(context, yuvIDs);
+ 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 | gyp/skia_for_android_framework_defines.gypi » ('j') | include/gpu/gl/GrGLTypes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698