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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1594483003: Texturing support for RECTANGLE textures. (Closed) Base URL: https://skia.googlesource.com/skia.git@rectangle
Patch Set: fix float->int warnings Created 4 years, 11 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 | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/SkGLContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 248a5dfbd250e91f45daa974be4f8b8d929324bc..1442c25419d2e82c284897ffaff619afee5bd1ec 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -3491,3 +3491,19 @@ GrGLAttribArrayState* GrGLGpu::HWGeometryState::internalBind(GrGLGpu* gpu,
}
return attribState;
}
+
+bool GrGLGpu::onMakeCopyForTextureParams(GrTexture* texture, const GrTextureParams& textureParams,
+ GrTextureProducer::CopyParams* copyParams) const {
+ if (textureParams.isTiled() ||
+ GrTextureParams::kMipMap_FilterMode == textureParams.filterMode()) {
+ GrGLTexture* glTexture = static_cast<GrGLTexture*>(texture);
+ if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
+ GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
+ copyParams->fFilter = GrTextureParams::kNone_FilterMode;
+ copyParams->fWidth = texture->width();
+ copyParams->fHeight = texture->height();
+ return true;
+ }
+ }
+ return false;
+}
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/SkGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698