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

Issue 22340010: Refactor GrGLUniformManager::UniformHandle to initialize itself by default (Closed)

Created:
7 years, 4 months ago by Kimmo Kinnunen
Modified:
7 years, 4 months ago
Reviewers:
bsalomon
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Refactor GrGLUniformManager::UniformHandle to initialize itself by default Refactor GrGLUniformManager::UniformHandle to initialize itself to "invalid" state by default. This simplifies the effect constructors. In the future, it should also help catch potential uninitialized uniform variable usage. Remove unneeded explicit uniform handle validity assertions before the handle usage. The assertion will always be made when handle is converted to index. BUG=skia:1492 Committed: http://code.google.com/p/skia/source/detail?r=10713

Patch Set 1 #

Total comments: 2

Patch Set 2 : Make index private to GrGLUniformManager #

Patch Set 3 : Make index private to GrGLUniformManager #

Patch Set 4 : .. and remember to update the description #

Patch Set 5 : Include feedback for patchset #1 (add friends) #

Patch Set 6 : description #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -105 lines) Patch
M src/effects/SkBicubicImageFilter.cpp View 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M src/effects/SkColorMatrixFilter.cpp View 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 2 3 4 4 chunks +2 lines, -8 lines 0 comments Download
M src/effects/SkMagnifierImageFilter.cpp View 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M src/effects/SkMatrixConvolutionImageFilter.cpp View 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M src/effects/SkMorphologyImageFilter.cpp View 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient.cpp View 2 3 4 2 chunks +0 lines, -3 lines 0 comments Download
M src/effects/gradients/SkTwoPointRadialGradient.cpp View 2 3 4 2 chunks +0 lines, -3 lines 0 comments Download
M src/gpu/effects/GrConvolutionEffect.cpp View 2 3 4 2 chunks +0 lines, -4 lines 0 comments Download
M src/gpu/effects/GrTextureDomainEffect.cpp View 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M src/gpu/gl/GrGLEffectMatrix.h View 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M src/gpu/gl/GrGLEffectMatrix.cpp View 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M src/gpu/gl/GrGLProgram.h View 2 3 4 1 chunk +0 lines, -11 lines 0 comments Download
M src/gpu/gl/GrGLProgram.cpp View 1 2 3 4 9 chunks +11 lines, -20 lines 0 comments Download
M src/gpu/gl/GrGLShaderBuilder.h View 1 2 3 4 5 chunks +7 lines, -6 lines 0 comments Download
M src/gpu/gl/GrGLShaderBuilder.cpp View 1 2 3 4 5 chunks +3 lines, -10 lines 0 comments Download
M src/gpu/gl/GrGLUniformHandle.h View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M src/gpu/gl/GrGLUniformManager.h View 1 2 3 4 2 chunks +28 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLUniformManager.cpp View 1 2 3 4 14 chunks +19 lines, -14 lines 0 comments Download
M src/gpu/gl/GrGpuGL_program.cpp View 2 3 4 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
Kimmo Kinnunen
7 years, 4 months ago (2013-08-09 06:35:09 UTC) #1
bsalomon
Mostly looks good, one request. https://codereview.chromium.org/22340010/diff/1/src/gpu/gl/GrGLUniformManager.h File src/gpu/gl/GrGLUniformManager.h (right): https://codereview.chromium.org/22340010/diff/1/src/gpu/gl/GrGLUniformManager.h#newcode29 src/gpu/gl/GrGLUniformManager.h:29: int toUniformIndex() const { ...
7 years, 4 months ago (2013-08-09 13:19:40 UTC) #2
Kimmo Kinnunen
On 2013/08/09 13:19:40, bsalomon wrote: > src/gpu/gl/GrGLUniformManager.h:29: int toUniformIndex() const { > GrAssert(isValid()); return ~fHandle; ...
7 years, 4 months ago (2013-08-12 08:57:17 UTC) #3
Kimmo Kinnunen
If need be, I can also upload a version which: * Renames GrGLUniformManager to GrGLUniform ...
7 years, 4 months ago (2013-08-12 12:53:44 UTC) #4
bsalomon
On 2013/08/12 08:57:17, kkinnunen wrote: > On 2013/08/09 13:19:40, bsalomon wrote: > > src/gpu/gl/GrGLUniformManager.h:29: int ...
7 years, 4 months ago (2013-08-12 13:05:50 UTC) #5
Kimmo Kinnunen
On 2013/08/12 13:05:50, bsalomon wrote: > On 2013/08/12 08:57:17, kkinnunen wrote: > > On 2013/08/09 ...
7 years, 4 months ago (2013-08-13 09:00:20 UTC) #6
Kimmo Kinnunen
https://codereview.chromium.org/22340010/diff/1/src/gpu/gl/GrGLUniformManager.h File src/gpu/gl/GrGLUniformManager.h (right): https://codereview.chromium.org/22340010/diff/1/src/gpu/gl/GrGLUniformManager.h#newcode29 src/gpu/gl/GrGLUniformManager.h:29: int toUniformIndex() const { GrAssert(isValid()); return ~fHandle; } On ...
7 years, 4 months ago (2013-08-13 09:00:33 UTC) #7
bsalomon
lgtm. I'm not sure I totally get your concern with respect to opaqueness. The main ...
7 years, 4 months ago (2013-08-14 14:28:12 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/22340010/41001
7 years, 4 months ago (2013-08-14 14:28:26 UTC) #9
commit-bot: I haz the power
7 years, 4 months ago (2013-08-14 18:14:31 UTC) #10
Message was sent while issue was closed.
Change committed as 10713

Powered by Google App Engine
This is Rietveld 408576698