Skip to content

Commit

Permalink
Possible narrowing conversion build fix for Compositor API example.
Browse files Browse the repository at this point in the history
In the compositor API example gcc 4.9 reports a possible
type narrowing when using fabs call. To fix this use fabsf instead.

BUG=385988
R=dmichael

Review URL: https://codereview.chromium.org/335383003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278076 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
pgal.u-szeged@partner.samsung.com committed Jun 18, 2014
1 parent c8b4896 commit c1f08e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ppapi/examples/compositor/compositor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ void DemoInstance::Paint(int32_t result, int32_t frame) {
float x = frame % 800;
float y = 200 - 200 * factor_sin;
const float transform[16] = {
fabs(factor_sin) + 0.2f, 0.0f, 0.0f, 0.0f,
0.0f, fabs(factor_sin) + 0.2f, 0.0f, 0.0f,
fabsf(factor_sin) + 0.2f, 0.0f, 0.0f, 0.0f,
0.0f, fabsf(factor_sin) + 0.2f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
x, y, 0.0f, 1.0f,
};
Expand Down

0 comments on commit c1f08e9

Please sign in to comment.