Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(42)

Issue 7200048: Add an origin flag for backend (external) textures. Some textures in WebKit have a topdown orienta… (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by Stephen White
Modified:
11 years, 9 months ago
Reviewers:
bsalomon
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

Add an origin flag for backend (external) textures. Some textures in WebKit have a topdown orientation, and skia needs to be notified of this, so that they are not drawn upside-down. Committed: https://code.google.com/p/skia/source/detail?r=7414

Patch Set 1 #

Patch Set 2 : Make BottomUp the default (as it was previously). Fix comment. #

Patch Set 3 : Refactor GrSurface::Origin and GrTextureOrigin into GrSurfaceOrigin. #

Patch Set 4 : Fix comment. #

Total comments: 4

Patch Set 5 : Fix enum style; fix RT check. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -32 lines) Patch
M include/gpu/GrRenderTarget.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M include/gpu/GrSurface.h View 1 2 3 chunks +4 lines, -15 lines 0 comments Download
M include/gpu/GrTexture.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M include/gpu/GrTypes.h View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M src/effects/SkDisplacementMapEffect.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkMatrixConvolutionImageFilter.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/effects/GrTextureDomainEffect.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLEffectMatrix.cpp View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/gl/GrGLRenderTarget.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLTexture.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLTexture.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGpuGL.cpp View 1 2 3 4 4 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 8
Stephen White
PTAL. I've made the orientation a global enum, with the idea that it could later ...
11 years, 9 months ago (2013-01-24 18:48:52 UTC) #1
bsalomon
Some thoughts: Let's go ahead and replace GrSurface::Origin with the new enum. I don't think ...
11 years, 9 months ago (2013-01-24 18:53:29 UTC) #2
Stephen White
On 2013/01/24 18:53:29, bsalomon wrote: > Some thoughts: > > Let's go ahead and replace ...
11 years, 9 months ago (2013-01-28 16:00:49 UTC) #3
bsalomon
On 2013/01/28 16:00:49, Stephen White wrote: > On 2013/01/24 18:53:29, bsalomon wrote: > > Some ...
11 years, 9 months ago (2013-01-28 16:02:57 UTC) #4
Stephen White
On 2013/01/28 16:02:57, bsalomon wrote: > On 2013/01/28 16:00:49, Stephen White wrote: > > On ...
11 years, 9 months ago (2013-01-28 16:04:05 UTC) #5
bsalomon
Mostly LGTM. One real comment and one style thing. https://codereview.appspot.com/7200048/diff/11001/include/gpu/GrTypes.h File include/gpu/GrTypes.h (right): https://codereview.appspot.com/7200048/diff/11001/include/gpu/GrTypes.h#newcode435 include/gpu/GrTypes.h:435: ...
11 years, 9 months ago (2013-01-28 16:09:00 UTC) #6
Stephen White
https://codereview.appspot.com/7200048/diff/11001/include/gpu/GrTypes.h File include/gpu/GrTypes.h (right): https://codereview.appspot.com/7200048/diff/11001/include/gpu/GrTypes.h#newcode435 include/gpu/GrTypes.h:435: enum GrSurfaceOrigin { On 2013/01/28 16:09:00, bsalomon wrote: > ...
11 years, 9 months ago (2013-01-28 16:38:42 UTC) #7
bsalomon
11 years, 9 months ago (2013-01-28 16:39:57 UTC) #8
On 2013/01/28 16:38:42, Stephen White wrote:
> https://codereview.appspot.com/7200048/diff/11001/include/gpu/GrTypes.h
> File include/gpu/GrTypes.h (right):
> 
>
https://codereview.appspot.com/7200048/diff/11001/include/gpu/GrTypes.h#newco...
> include/gpu/GrTypes.h:435: enum GrSurfaceOrigin {
> On 2013/01/28 16:09:00, bsalomon wrote:
> > For enums in the global scope try to make the values have a Sk/Gr in the
type
> > part of the name. E.g. kBottomLeft_GrSurfaceOrigin. 
> > 
> > (Some older Gr enums don't follow this convention. I'm trying to fix them
> slowly
> > over time.)
> 
> Done.
> 
> https://codereview.appspot.com/7200048/diff/11001/src/gpu/gl/GrGpuGL.cpp
> File src/gpu/gl/GrGpuGL.cpp (right):
> 
>
https://codereview.appspot.com/7200048/diff/11001/src/gpu/gl/GrGpuGL.cpp#newc...
> src/gpu/gl/GrGpuGL.cpp:489: if (kBottomLeft_SurfaceOrigin != desc.fOrigin) {
> On 2013/01/28 16:09:00, bsalomon wrote:
> > Don't you need to check if the RT bit is set here? I think this will prevent
> any
> > bottom-left texture wrap from succeeding. 
> 
> Doh!  I thought I was in onWrapBackendRenderTarget().  Fixed.

LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b