Make the orientation of a texture accessible from and known by GrSurface.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6801044
git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6148 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 04d0f8e..28963f1 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -490,7 +490,7 @@
glTexDesc.fSampleCnt = desc.fSampleCnt;
glTexDesc.fTextureID = static_cast<GrGLuint>(desc.fTextureHandle);
glTexDesc.fOwnsID = false;
- glTexDesc.fOrientation = GrGLTexture::kBottomUp_Orientation;
+ glTexDesc.fOrigin = GrSurface::kBottomLeft_Origin;
GrGLTexture* texture = NULL;
if (desc.fFlags & kRenderTarget_GrBackendTextureFlag) {
@@ -574,7 +574,7 @@
desc.fConfig = glTex->config();
desc.fSampleCnt = glTex->desc().fSampleCnt;
desc.fTextureID = glTex->textureID();
- desc.fOrientation = glTex->orientation();
+ desc.fOrigin = glTex->origin();
this->uploadTexData(desc, false,
left, top, width, height,
@@ -665,7 +665,7 @@
bool swFlipY = false;
bool glFlipY = false;
if (NULL != data) {
- if (GrGLTexture::kBottomUp_Orientation == desc.fOrientation) {
+ if (GrSurface::kBottomLeft_Origin == desc.fOrigin) {
if (this->glCaps().unpackFlipYSupport()) {
glFlipY = true;
} else {
@@ -948,8 +948,7 @@
// We keep GrRenderTargets in GL's normal orientation so that they
// can be drawn to by the outside world without the client having
// to render upside down.
- glTexDesc.fOrientation = renderTarget ? GrGLTexture::kBottomUp_Orientation :
- GrGLTexture::kTopDown_Orientation;
+ glTexDesc.fOrigin = renderTarget ? GrSurface::kBottomLeft_Origin : GrSurface::kTopLeft_Origin;
glRTDesc.fSampleCnt = desc.fSampleCnt;
if (GrGLCaps::kNone_MSFBOType == this->glCaps().msFBOType() &&