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

Issue 6354094: Fix lighting filters on Windows (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by Stephen White
Modified:
12 years, 1 month ago
Reviewers:
bsalomon, TomH
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Return a const ref to the fS member var, as is done for the other getters, instead of a copy. This prevents a crash when calling setUniformPoint3() on the result. To be honest, I'm not sure why this fix works. Allocating a temporary SkPoint3 on the stack should've been fine for calling setUniformPoint3, since it should live until the next sequence point, but it isn't fine and crashes before setUniformPoint3 even gets called. Another equally mysterious fix that works is to provide an explicit copy constructor for SkPoint3. The compiler-provided one should've been fine, since it's just 3 floats. Either there's a compiler bug, or I need remedial C++ lessons. Also remove a spurious call to glGetUniformLocation for fCosOuterConeAngle.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -11 lines) Patch
src/effects/SkLightingImageFilter.cpp View 4 chunks +1 line, -11 lines 2 comments Download

Messages

Total messages: 6
Stephen White
12 years, 2 months ago (2012-07-11 20:30:24 UTC) #1
TomH
http://codereview.appspot.com/6354094/diff/1/src/effects/SkLightingImageFilter.cpp File src/effects/SkLightingImageFilter.cpp (left): http://codereview.appspot.com/6354094/diff/1/src/effects/SkLightingImageFilter.cpp#oldcode1311 src/effects/SkLightingImageFilter.cpp:1311: GR_GL_CALL_RET(gl, fCosOuterConeAngleLocation, Unintentional removal?
12 years, 2 months ago (2012-07-11 20:33:09 UTC) #2
Stephen White
http://codereview.appspot.com/6354094/diff/1/src/effects/SkLightingImageFilter.cpp File src/effects/SkLightingImageFilter.cpp (left): http://codereview.appspot.com/6354094/diff/1/src/effects/SkLightingImageFilter.cpp#oldcode1311 src/effects/SkLightingImageFilter.cpp:1311: GR_GL_CALL_RET(gl, fCosOuterConeAngleLocation, On 2012/07/11 20:33:09, TomH wrote: > Unintentional ...
12 years, 2 months ago (2012-07-11 20:36:36 UTC) #3
bsalomon
Bizarre. I can't think of how it could be anything but a compiler bug. LGTM
12 years, 2 months ago (2012-07-11 20:37:54 UTC) #4
TomH
LGTM. Ship it!
12 years, 2 months ago (2012-07-11 20:41:09 UTC) #5
Stephen White
12 years, 1 month ago (2012-07-12 20:26:05 UTC) #6
Landed in r4557.  Closing.
Sign in to reply to this message.

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