Implement support for origin-TopLeft render targets. Note that the default behaviour remains the same: textures default to origin-TopLeft, render targets default to origin-BottomLeft, and backend textures default to origin-BottomLeft. However, the caller can override the default by setting fOrigin in GrTextureDesc, GrBackendTextureDesc or GrBackendRenderTargetDesc.
Review URL: https://codereview.appspot.com/7230049
git-svn-id: http://skia.googlecode.com/svn/trunk@7594 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index df9d8fc..71cb699 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -86,8 +86,7 @@
int width, int height,
GrPixelConfig,
void* buffer,
- size_t rowBytes,
- bool invertY) SK_OVERRIDE;
+ size_t rowBytes) SK_OVERRIDE;
virtual void onWriteTexturePixels(GrTexture* texture,
int left, int top, int width, int height,
@@ -322,11 +321,13 @@
} fHWAAState;
struct {
- SkMatrix fViewMatrix;
- SkISize fRTSize;
+ SkMatrix fViewMatrix;
+ SkISize fRTSize;
+ GrSurfaceOrigin fLastOrigin;
void invalidate() {
fViewMatrix = SkMatrix::InvalidMatrix();
fRTSize.fWidth = -1; // just make the first value compared illegal.
+ fLastOrigin = (GrSurfaceOrigin) -1;
}
} fHWPathMatrixState;