Reverting r2969, since it broke the GLPrograms RunTests step.
Unreviewed; build fix. git-svn-id: http://skia.googlecode.com/svn/trunk@2972 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
7191840eec
commit
8ff9c74892
@ -90,19 +90,6 @@ protected:
|
||||
matrix.setYUV2RGB();
|
||||
filter->setMatrix(matrix);
|
||||
canvas->drawBitmap(fBitmap, 80, 160, &paint);
|
||||
|
||||
SkScalar s1 = SK_Scalar1;
|
||||
SkScalar s255 = SkIntToScalar(255);
|
||||
// Move red into alpha, set color to white
|
||||
SkScalar data[20] = {
|
||||
0, 0, 0, 0, s255,
|
||||
0, 0, 0, 0, s255,
|
||||
0, 0, 0, 0, s255,
|
||||
s1, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
filter->setArray(data);
|
||||
canvas->drawBitmap(fBitmap, 160, 160, &paint);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -373,8 +373,7 @@ static void addColorFilter(GrStringBuilder* fsCode, const char * outputVar,
|
||||
*/
|
||||
static void addColorMatrix(GrStringBuilder* fsCode, const char * outputVar,
|
||||
const char* inColor) {
|
||||
fsCode->appendf("\t%s = %s * vec4(%s.rgb / %s.a, %s.a) + %s;\n", outputVar, COL_MATRIX_UNI_NAME, inColor, inColor, inColor, COL_MATRIX_VEC_UNI_NAME);
|
||||
fsCode->appendf("\t%s.rgb *= %s.a;\n", outputVar, outputVar);
|
||||
fsCode->appendf("%s = %s * %s + %s;\n", outputVar, COL_MATRIX_UNI_NAME, inColor, COL_MATRIX_VEC_UNI_NAME);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
Loading…
Reference in New Issue
Block a user