diff options
author | senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-29 19:47:06 +0000 |
---|---|---|
committer | senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-29 19:47:06 +0000 |
commit | 7b734e08430f6b1d147dfa9f0c2c08d88aa7b714 (patch) | |
tree | c64ef068ab1e305a7b932e1eec0111b3802dd574 /gm | |
parent | 42041e6de830c11f252aab072a6527bb28840468 (diff) |
Fix alpha computation for specular lighting filter (GPU path).
Change lighting GM background to show blending.
NOTE: This will require new results for the lighting GM.
Review URL: https://codereview.appspot.com/6812050
git-svn-id: http://skia.googlecode.com/svn/trunk@6181 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r-- | gm/lighting.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gm/lighting.cpp b/gm/lighting.cpp index 46474abc35..9db34fde3d 100644 --- a/gm/lighting.cpp +++ b/gm/lighting.cpp @@ -47,6 +47,18 @@ protected: make_bitmap(); fInitialized = true; } + canvas->clear(0xFF101010); + SkPaint checkPaint; + checkPaint.setColor(0xFF202020); + for (int y = 0; y < HEIGHT; y += 16) { + for (int x = 0; x < WIDTH; x += 16) { + canvas->save(); + canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); + canvas->drawRect(SkRect::MakeXYWH(8, 0, 8, 8), checkPaint); + canvas->drawRect(SkRect::MakeXYWH(0, 8, 8, 8), checkPaint); + canvas->restore(); + } + } SkPoint3 pointLocation(0, 0, SkIntToScalar(10)); SkScalar azimuthRad = SkDegreesToRadians(SkIntToScalar(225)); SkScalar elevationRad = SkDegreesToRadians(SkIntToScalar(5)); |