Commit Graph

21038 Commits

Author SHA1 Message Date
caryclark
9ae14ff4b1 remove xmlparser includes from samples
Remove all #include SkXMLParser.h from SampleApp samples.

R=tomhudson@google.com
BUG=skia:309
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737383002

Review URL: https://codereview.chromium.org/1737383002
2016-02-29 09:13:26 -08:00
mtklein
2d225e3a0f hack up get_images_from_skps
I couldn't get the version at head to give me any images,
so I decided to rewrite it.  Does something like this work
for you?

BUG=skia:5010,skia:5005

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737593003

Review URL: https://codereview.chromium.org/1737593003
2016-02-29 09:05:32 -08:00
mtklein
7b6d3a30cf DM: disable ignored and very niche configs on bots.
These are all probably just wasting time:
  - upright-matrix-{8888,gpu} and remote[_cache] are ignored in Gold
  - sp and 2ndpic test very niche areas of SkPicture
    that are not under active change
  - twice-8888 was never useful... the twice- via was meant for local
    testing of GPU batching / caching.  Drawing into 8888 was moot.

These configs are all useful to keep around for local testing, but probably are
not worth the extra runtime or especially burden to have to think about them.

If we should happen to stumble into bugs these configs would have caught,
let's add them back with a note about those bugs to justify their need to run.
I'm not convinced any exist today.

This cuts ~30s off the CQ.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1745073002

Review URL: https://codereview.chromium.org/1745073002
2016-02-29 08:52:27 -08:00
borenet
c0cb60d453 Swarming Tests: create tmp dir if it doesn't exist
TBR=rmistry
NOTRY=true
BUG=skia:4763
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1749623003

Review URL: https://codereview.chromium.org/1749623003
2016-02-29 08:39:27 -08:00
borenet
17597fe29d Swarming tests: Fix uninteresting hash file path
TBR=rmistry
NOTRY=true
BUG=skia:4763
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1746063002

Review URL: https://codereview.chromium.org/1746063002
2016-02-29 08:19:42 -08:00
herb
9466571f8e tile spans
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1719333002

Review URL: https://codereview.chromium.org/1719333002
2016-02-29 07:53:22 -08:00
joshualitt
b95c772d45 Add abilitly to query audit trail for batches by draw op
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1745513002

Committed: https://skia.googlesource.com/skia/+/9b48a6e3f862076018cc7d63b180b6340f4873cd

Review URL: https://codereview.chromium.org/1745513002
2016-02-29 07:44:02 -08:00
mtklein
409d470a49 Add gamma_correct option field to dm.json
E.g.

{
   "max_rss_MB" : 23,
   "results" : [
      {
         "key" : {
            "config" : "pdf",
            "name" : "gamma",
            "source_type" : "gm"
         },
         "md5" : "c5dfb531f4d76c77c3305b6a04733262",
         "options" : {
            "ext" : "pdf",
            "gamma_correct" : false
         }
      },
      {
         "key" : {
            "config" : "8888",
            "name" : "gamma",
            "source_type" : "gm"
         },
         "md5" : "6177860ed24106446d3a9087527e67bf",
         "options" : {
            "ext" : "png",
            "gamma_correct" : false
         }
      },
      {
         "key" : {
            "config" : "f16",
            "name" : "gamma",
            "source_type" : "gm"
         },
         "md5" : "213f80145953ecd4c71e0612447b2ad9",
         "options" : {
            "ext" : "png",
            "gamma_correct" : true
         }
      }
   ]
}

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1741973002

Review URL: https://codereview.chromium.org/1741973002
2016-02-29 07:38:01 -08:00
yujieqin
f236ee4e44 Enable RAW codec for Windows
* Fix the exception catching
* Set preprocessor differently for MSVC

BUG=skia:4889(b/26958348)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1738913002

Committed: https://skia.googlesource.com/skia/+/474e4c3dd28b67f590851321f15d9983ef7fd031

Review URL: https://codereview.chromium.org/1738913002
2016-02-29 07:14:42 -08:00
bsalomon
e93c17b35a Remove legacy Budgeted enum aliases from SkSurface
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1743233002

Review URL: https://codereview.chromium.org/1743233002
2016-02-29 07:06:22 -08:00
mtklein
f855729564 DM crash handler tweaks
- try to guard against reentrant signals.
    - re-raise the signal with the default handler when done printing.
    - support Windows

BUG=589654
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744553002

Review URL: https://codereview.chromium.org/1744553002
2016-02-29 06:35:29 -08:00
joshualitt
08fc80704d Revert of Add abilitly to query audit trail for batches by draw op (patchset #4 id:60001 of https://codereview.chromium.org/1745513002/ )
Reason for revert:
kInvalidID conflicts with an older xCode #define

Original issue's description:
> Add abilitly to query audit trail for batches by draw op
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1745513002
>
> Committed: https://skia.googlesource.com/skia/+/9b48a6e3f862076018cc7d63b180b6340f4873cd

TBR=ethannicholas@google.com,jcgregorio@google.com,joshualitt@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1747893002
2016-02-29 06:32:24 -08:00
borenet
a7a6f2e01d Add test_skia.py, isolates for test_skia, images, skps
This enables running DM through Swarming.

NOTRY=true
BUG=skia:4763
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1743113003

Review URL: https://codereview.chromium.org/1743113003
2016-02-29 05:57:31 -08:00
joshualitt
6bc967984a A bit more privacy for SkiaServe's Request
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1741043003

Review URL: https://codereview.chromium.org/1741043003
2016-02-29 05:35:04 -08:00
joshualitt
9b48a6e3f8 Add abilitly to query audit trail for batches by draw op
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1745513002

Review URL: https://codereview.chromium.org/1745513002
2016-02-29 05:20:38 -08:00
reed
7f4b1b20b0 move drawextrapatheffect header into animator
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1747753002

TBR=caryclark@google.com

Review URL: https://codereview.chromium.org/1747753002
2016-02-28 12:46:29 -08:00
update-skps
e1a23c502d Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1742243002

Review URL: https://codereview.chromium.org/1742243002
2016-02-28 00:27:30 -08:00
reed
fa82348a39 remove unused view helpers
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744043002

TBR=

Review URL: https://codereview.chromium.org/1744043002
2016-02-27 19:41:54 -08:00
reed
f3fb5d3fb8 update CMakeLists for views/aminated removal
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1749483002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

NOTRY=True
TBR=

Review URL: https://codereview.chromium.org/1749483002
2016-02-27 14:03:39 -08:00
reed
60d0259486 remove unused view files
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1745813002

TBR=

Review URL: https://codereview.chromium.org/1745813002
2016-02-27 13:32:44 -08:00
reed
6b2af12a39 remove unneeded view subclasses
no doubt, more deletes will follow...
goodbye old friends

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1740383002

TBR=

Review URL: https://codereview.chromium.org/1740383002
2016-02-27 12:51:30 -08:00
rmistry
afaf496910 Add catapult to RecreateSKPs bot's PYTHONPATH
TBR=borenet
BUG=skia:5024
NOTRY=true
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1747623002

Review URL: https://codereview.chromium.org/1747623002
2016-02-27 10:04:57 -08:00
mtklein
cb3d4fc7d6 Revert of Enable RAW codec for Windows (patchset #8 id:140001 of https://codereview.chromium.org/1738913002/ )
Reason for revert:
I don't think there's anything wrong with this per-se, but the 32-bit Windows bots are running out of memory while running these tests now.

(You'll see something like c:\0\build\slave\workdir\build\skia\include\core\skbitmap.h:247: fatal error: ""sk_throw"" in the log.)

We run these tests in parallel, and sometimes these 32-bit processes try to use more than the 2-3G RAM they can allocate.  Seems like this is a particularly memory-intense process?

If we reland this, we might want to blacklist these tests on the 32-bit Windows bots.  The 64-bit bots should have access to tons and tons of RAM and let us keep testing for Windows.

Original issue's description:
> Enable RAW codec for Windows
>
> * Fix the exception catching
> * Set preprocessor differently for MSVC
>
> BUG=skia:4889(b/26958348)
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1738913002
>
> Committed: https://skia.googlesource.com/skia/+/474e4c3dd28b67f590851321f15d9983ef7fd031

TBR=scroggo@google.com,msarett@google.com,yujieqin@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4889(b/26958348)

Review URL: https://codereview.chromium.org/1747443003
2016-02-26 16:57:33 -08:00
brucedawson
0fe12bcfb7 Revert of Add non-inline SkRTreeFactory constructor to fix clang-cl (patchset #2 id:20001 of https://codereview.chromium.org/1676833002/ )
Reason for revert:
This workaround should no longer be needed, per comment#16 from
thakis@ on the original CL.

Original issue's description:
> Add non-inline SkRTreeFactory constructor to fix clang-cl
>
> When Chromium is switched to build with VS 2015 that switches clang-cl
> to build in -fmsc-version=1900 mode. This causes some changes in
> importing of constructors and vftables which leads to link errors in
> blink_platform.dll. Adding a non-inline constructor makes 1900 mode
> behave consistently with 1800 mode and avoids the link error.
>
> The root cause needs investigation but this will unblock the VS 2015
> switch.
>
> BUG=440500,498544
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1676833002
>
> Committed: https://skia.googlesource.com/skia/+/964eec67760196585954203ba625e440607f7e92

TBR=reed@google.com,bsalomon@google.com,mtklein@chromium.org,thakis@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=440500,498544

Review URL: https://codereview.chromium.org/1739363002
2016-02-26 16:31:12 -08:00
mtklein
e027f1705e DM: dm.json can be missing some final results
We called JsonWriter::DumpJson() every once in a while,
but this did not necssarily wait for offloaded PNG encoding to finish.

This means we might have been dropping some DM results for a while now.
Fix by one more JsonWriter::DumpJson() call after joining back to the
main thread.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744723002

Review URL: https://codereview.chromium.org/1744723002
2016-02-26 15:53:06 -08:00
mtklein
27c3fddaac DM: support --config {f16,srgb}
Will need to follow up with enabling f16 and srgb configs.
They're still assert-y.

The GMs 'gamma' and 'gradients' look reassuringly good on f16 and srgb backends.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1711143002

Review URL: https://codereview.chromium.org/1711143002
2016-02-26 14:43:21 -08:00
jvanverth
de11ee41b3 Switch float arrays to vecs for conical gradients
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1745613002

Review URL: https://codereview.chromium.org/1745613002
2016-02-26 13:58:40 -08:00
cblume
55f2d2d57f Creating functions for uploading a mipmapped texture.
BUG=476416
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1249543003

Review URL: https://codereview.chromium.org/1249543003
2016-02-26 13:20:48 -08:00
egdaniel
e015c2646f Make GrVkStencilAttachment derive form GrVkImage
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1735283004

Review URL: https://codereview.chromium.org/1735283004
2016-02-26 13:12:00 -08:00
egdaniel
d524f16b98 Fix memory crash in vulakn writeUniformBuffers
BUG=skia:5021
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737593005

Review URL: https://codereview.chromium.org/1737593005
2016-02-26 13:06:55 -08:00
cdalton
87332103c6 Replace fWillReadFragmentPosition with a bitfield
Replaces fWillReadFragmentPosition on GrProcessor with a
"RequiredFeatures" bitfield. This will allow us to add additional
built-in features. Completely removes information about reading the
fragment position from GrPipeline and GrProcOptInfo.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1734163002

Review URL: https://codereview.chromium.org/1734163002
2016-02-26 12:22:02 -08:00
brianosman
e5824b90da New GM that exercises gamma-correctness in various parts of the pipeline.
Attempts to render 50% grey through many different techniques. Only the first one (black/white dither) is guaranteed to be correct. This serves as ground-truth for all the others (independent of whatever your display may or may not be doing when viewing the output of the GM).

Current tests:
- Texture bilerp
- Texture scale (ie mipmaps)
- Simple paint color
- Gradient
- A handful of Xfer modes
- 50% grey bitmaps, both linear and sRGB
- Bitmaps wrapped in shaders, which hits a different raster code path

TODO:
- Test coverage (rather than alpha)?
- Text, Blur, etc...?

Re-landing this without the blitter selection change, which may have caused a regression. Also updated the text color so it's legible against both black (SampleApp) and white (gold).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1740213003

Review URL: https://codereview.chromium.org/1740213003
2016-02-26 11:57:23 -08:00
cdalton
eb79eea617 Include glGetMultisamplefv API
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1720963002

Committed: https://skia.googlesource.com/skia/+/69c1b24bcaa7cffd59753a75a7f3d155696fcac4

Review URL: https://codereview.chromium.org/1720963002
2016-02-26 10:39:34 -08:00
bsalomon
b2c0133caf When a surface is backed by an external render target force a copy on image snap
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1694943002

Review URL: https://codereview.chromium.org/1694943002
2016-02-26 10:37:26 -08:00
jvanverth
992ad363d7 Add back Vk files with LF endings
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1745433002

Review URL: https://codereview.chromium.org/1745433002
2016-02-26 09:21:02 -08:00
brianosman
fe4b4f00d7 Revert of New GM that exercises gamma-correctness in various parts of the pipeline. (patchset #4 id:60001 of https://codereview.chromium.org/1734983003/ )
Reason for revert:
Testing revert to fix MacMini?

Original issue's description:
> New GM that exercises gamma-correctness in various parts of the pipeline.
>
> Attempts to render 50% grey through many different techniques. Only the first one (black/white dither) is guaranteed to be correct. This serves as ground-truth for all the others (independent of whatever your display may or may not be doing when viewing the output of the GM).
>
> Current tests:
> - Texture bilerp
> - Texture scale (ie mipmaps)
> - Simple paint color
> - Gradient
> - A handful of Xfer modes
> - 50% grey bitmaps, both linear and sRGB
>
> Also includes a bug-fix for sRGB -> Linear bitmap case
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1734983003
>
> Committed: https://skia.googlesource.com/skia/+/9f73a71eec0eb54783f2dcad009aae6aafbe38d5

TBR=bsalomon@google.com,reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1744533002
2016-02-26 09:19:02 -08:00
jvanverth
e02918dc34 Remove Vk files with spurious CRLFs
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1726403007

Review URL: https://codereview.chromium.org/1726403007
2016-02-26 09:05:27 -08:00
robertphillips
e8517147ee Make GrRRectBlurEffect::onIsEqual include the roundrect's rect
BUG=skia:5014
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1743553003

Review URL: https://codereview.chromium.org/1743553003
2016-02-26 08:51:25 -08:00
joshualitt
ee5348b069 Get SkiaServe Request started off with a little privacy
This CL moves the surface stuff into the request object so it
can maintain its internal state consistently

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1741823002

Review URL: https://codereview.chromium.org/1741823002
2016-02-26 08:36:25 -08:00
egdaniel
67acb83ce9 Fix oval rendering in vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1739063002

Review URL: https://codereview.chromium.org/1739063002
2016-02-26 08:32:20 -08:00
halcanary
d5722a4a1b SkPDF/Test: detailed error messages in PDFDeflateWStreamTest
BUG=skia:5009
TBR=

Review URL: https://codereview.chromium.org/1727153005
2016-02-26 08:29:25 -08:00
joshualitt
1e5884b066 Wire up /batches in skiaserve
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737323002

Review URL: https://codereview.chromium.org/1737323002
2016-02-26 08:22:49 -08:00
egdaniel
4ee1cdad52 Fix uniform buffer layout in vulkan
TBR=jvanverth@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1734403002

Review URL: https://codereview.chromium.org/1734403002
2016-02-26 08:18:49 -08:00
joshualitt
18d6b75829 Add batchlist managment to GrAuditTrail
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1724243004

Review URL: https://codereview.chromium.org/1724243004
2016-02-26 08:07:50 -08:00
egdaniel
42701e98e1 Add VkProgramDataManager back into to repo
Confirmed that this is concidered a plain ASCII file with no CR

TBR=jvanverth@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1743593002

Review URL: https://codereview.chromium.org/1743593002
2016-02-26 08:02:55 -08:00
brianosman
9f73a71eec New GM that exercises gamma-correctness in various parts of the pipeline.
Attempts to render 50% grey through many different techniques. Only the first one (black/white dither) is guaranteed to be correct. This serves as ground-truth for all the others (independent of whatever your display may or may not be doing when viewing the output of the GM).

Current tests:
- Texture bilerp
- Texture scale (ie mipmaps)
- Simple paint color
- Gradient
- A handful of Xfer modes
- 50% grey bitmaps, both linear and sRGB

Also includes a bug-fix for sRGB -> Linear bitmap case

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1734983003

Review URL: https://codereview.chromium.org/1734983003
2016-02-26 07:59:33 -08:00
egdaniel
89a60297fa Try to fix broken file by just deleting it.
Will try re uploading fixed version after.

TBR=jvanverth@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737763003

Review URL: https://codereview.chromium.org/1737763003
2016-02-26 07:40:52 -08:00
yujieqin
474e4c3dd2 Enable RAW codec for Windows
* Fix the exception catching
* Set preprocessor differently for MSVC

BUG=skia:4889(b/26958348)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1738913002

Review URL: https://codereview.chromium.org/1738913002
2016-02-26 06:18:20 -08:00
caryclark
cb10071171 add gm to illustrate bug
TBR=reed@google.com
BUG=skia:517
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1734343004

Review URL: https://codereview.chromium.org/1734343004
2016-02-26 05:59:40 -08:00
caryclark
952538ed50 fix undefined signed shifts
The expression (1 << 31) is technically undefined.

Fixed the undefined shift referenced by this bug and
a few friends.

R=reed@google.com
BUG=skia:2285
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737363002

Review URL: https://codereview.chromium.org/1737363002
2016-02-26 05:01:42 -08:00