SkRecord bug fixes

Optional arguments to SkCanvas calls leaked refs (but not memory) because we
didn't destruct the optional objects (really, just SkPaint: other optional args
are all POD).  This adds Optional and PODArray, where Optional makes sure to
call the destructor.

I overlooked that SkPictureRecord really does call paint.computeFastBounds().
Do the same in SkRecordDraw.

BUG=skia:2378
R=reed@google.com, mtklein@google.com, tomhudson@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14197 2bbb7eff-a529-9590-31e7-b0007b416f81
ignore Test-Linux-Bare-NoGPU-Arm8_64 GM failures

(SkipBuildbotRuns)
BUG=skia:2422
NOTREECHECKS=True
NOTRY=True
R=halcanary@google.com
TBR=halcanary

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14198 2bbb7eff-a529-9590-31e7-b0007b416f81
Add GL_CHROMIUM_map_sub functions to GrGLInterface and bit to GrGLCaps.

BUG=skia:2402
R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14199 2bbb7eff-a529-9590-31e7-b0007b416f81
Make sure SkDrawLooper objects can only be allocated on the heap.

Make constructors of SkLayerDrawLooper and SkBlurDrawLooper non-public.
Remove addLayer* methods from SkLayerDrawLooper. SkLayerDrawLooper::Builder is
used to create new objects.
Provide factory method for creating SkBlurDrawLooper.

BUG=2141
R=scroggo@google.com, reed@google.com, djsollen@google.com

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14200 2bbb7eff-a529-9590-31e7-b0007b416f81
Fix size of rotated text with FreeType.

This generalizes and shares the solution found for a similar issue with
GDI. The issue is that the text size is applied early, and the rest of
the transformation late. This allows us to isolate and independently
control the text size from the rest of the transformation.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14201 2bbb7eff-a529-9590-31e7-b0007b416f81
Add cast for warning as error on Windows from r14201.


git-svn-id: http://skia.googlecode.com/svn/trunk@14202 2bbb7eff-a529-9590-31e7-b0007b416f81
Fix artifacts in distance field rendering due to bilerp

Because we were using the full distance field glyph rect, there were cases
when a neighboring texel might be set to full value (e.g. we might copy the
glyph over old data after a purge). This was giving artifacts, and insetting
the rect by 1 solves the problem. In doing this, I discovered that removing the
extra 1 texel pad around the glyph meant to handle bilerp, and insetting by 2,
works just as well and saves space in the glyph atlas.

R=bsalomon@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14203 2bbb7eff-a529-9590-31e7-b0007b416f81
initialize bounds in this test

BUG=skia:
R=bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14204 2bbb7eff-a529-9590-31e7-b0007b416f81
Rebaselines for r14201. (Fix size of rotated text with FreeType.)


git-svn-id: http://skia.googlecode.com/svn/trunk@14205 2bbb7eff-a529-9590-31e7-b0007b416f81
Rebaselines for r14201. (Fix size of rotated text with FreeType.)


git-svn-id: http://skia.googlecode.com/svn/trunk@14206 2bbb7eff-a529-9590-31e7-b0007b416f81
Revert of rebaseline_server: multithreaded loading/diffing of images (https://codereview.chromium.org/235923002/)

Reason for revert:
Caused https://code.google.com/p/skia/issues/detail?id=2423 ('"Deadline exceeded" error when connecting to live rebaseline_server').  Reverting until I can figure it out.

Original issue's description:
> rebaseline_server: multithreaded loading/diffing of images
>
> BUG=skia:2414
> NOTRY=True
>
> Committed: http://code.google.com/p/skia/source/detail?r=14184

R=rmistry@google.com
TBR=rmistry@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2414

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14207 2bbb7eff-a529-9590-31e7-b0007b416f81
Rebaselines for r14201. (Fix size of rotated text with FreeType.)


git-svn-id: http://skia.googlecode.com/svn/trunk@14208 2bbb7eff-a529-9590-31e7-b0007b416f81
arm64_download script waits for VM to boot before finishing.

It may take an unknown amount of time to boot.

Also, add `set -e` to the script to simplify error handling.

BUG=skia:2425
NOTRY=true
R=epoger@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14209 2bbb7eff-a529-9590-31e7-b0007b416f81
arm64_download script - fix error starting vm twice.
R=epoger@google.com
TBR=epoger@google.com
NOTRY=true

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14210 2bbb7eff-a529-9590-31e7-b0007b416f81
Pull ANGLE's new repository to third_party/external/angle2.

BUG=skia:2272
R=bsalomon@chromium.org, bsalomon@google.com

Author: geofflang@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14211 2bbb7eff-a529-9590-31e7-b0007b416f81
Fix generation of Android SampleApp APK now that we default to using gyp's ninja generator.

R=scroggo@google.com

Author: djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14212 2bbb7eff-a529-9590-31e7-b0007b416f81
Rebaselines for r14201. (Fix size of rotated text with FreeType.)


git-svn-id: http://skia.googlecode.com/svn/trunk@14213 2bbb7eff-a529-9590-31e7-b0007b416f81
Fix bug in SampleApp's Tiling View

SampleApp was crashing when invoked as "SampleApp --slide Tiling" due to r14171 (split SkPictureRecorder out of SkPicture - https://codereview.chromium.org/214953003/)

R=bungeman@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14214 2bbb7eff-a529-9590-31e7-b0007b416f81
Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@14215 2bbb7eff-a529-9590-31e7-b0007b416f81
Extract most of the mutable state of SkShader into a separate Context object.

SkShader currently stores some state during draw calls via setContext(...).
Move that mutable state into a separate SkShader::Context class that is
constructed on demand for the duration of the draw.

Calls to setContext() are replaced with createContext() which returns a context
corresponding to the shader object or NULL if the parameters to createContext
are invalid.

TEST=out/Debug/dm
BUG=skia:1976
R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14216 2bbb7eff-a529-9590-31e7-b0007b416f81