platform/upstream/libSkiaSharp.git
9 years agoRemove canApplyCoverage from XP and all related functions in gpu code.
egdaniel [Mon, 23 Feb 2015 20:12:54 +0000 (12:12 -0800)]
Remove canApplyCoverage from XP and all related functions in gpu code.

BUG=skia:

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

9 years agoReset conicWeights in SkPath::consumeDegenerateSegments when rewinding to last Move op
robertphillips [Mon, 23 Feb 2015 19:17:01 +0000 (11:17 -0800)]
Reset conicWeights in SkPath::consumeDegenerateSegments when rewinding to last Move op

Without this patch the iterator can end up running off the end of the conic weights if there is a mixture of degenerate and non-degenerate ops

Note: we might want to suppress the generation of degenerate conics and lines in SkPath::addRRect

BUG=459897

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

9 years agoMake STDPQueue::at() available in all builds.
bsalomon [Mon, 23 Feb 2015 18:59:50 +0000 (10:59 -0800)]
Make STDPQueue::at() available in all builds.

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

9 years agoSkDiscardablePixelRef should favor not decoding to YUV if they already decoded to...
vmiura [Mon, 23 Feb 2015 18:59:44 +0000 (10:59 -0800)]
SkDiscardablePixelRef should favor not decoding to YUV if they already decoded to RGB.

BUG=skia:
BUG=459760

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

9 years agoRemove EGL header from SkANGLELContext.h
bsalomon [Mon, 23 Feb 2015 18:51:13 +0000 (10:51 -0800)]
Remove EGL header from SkANGLELContext.h

TBR=egdaniel@google.com

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

9 years agoRevert of DM: lazy decoding on SKP playback (patchset #4 id:60001 of https://coderevi...
halcanary [Mon, 23 Feb 2015 18:43:48 +0000 (10:43 -0800)]
Revert of DM: lazy decoding on SKP playback (patchset #4 id:60001 of https://codereview.chromium.org/943383002/)

Reason for revert:
crashing dm

Test-Mac10.9-MacMini6.2-HD4000-x86_64-Debug

u gm addarc
(1431MB   932) 169ms gpu gm aarectmodes
(1431MB   931) 38.6ms gpu gm aaclip
(1431MB   930) 474ms gpu skp desk_amazon.skp
(1431MB   929) 615ms gpu skp desk_baidu.skp
(1431MB   928) 600ms gpu skp desk_blogger.skp
Signal 11:
_sigtramp (+0x1a)
compute_yuv_size(jpeg_decompress_struct const&, int, SizeType) (+0x30)
update_components_sizes(jpeg_decompress_struct const&, SkTSize<int>*, SizeType) (+0x46)
SkJPEGImageDecoder::onDecodeYUV8Planes(SkStream*, SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x239)
SkImageDecoder::decodeYUV8Planes(SkStream*, SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x64)
SkImageDecoderGenerator::onGetYUV8Planes(SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x9f)
SkImageGenerator::getYUV8Planes(SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x3b7)
SkDiscardablePixelRef::onGetYUV8Planes(SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x3c)
SkPixelRef::getYUV8Planes(SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x55)
load_yuv_texture(GrContext*, GrUniqueKey const&, SkBitmap const&, GrSurfaceDesc const&) (+0x24b)
create_unstretched_bitmap_texture(GrContext*, SkBitmap const&, GrUniqueKey const&) (+0x3df)
create_bitmap_texture(GrContext*, SkBitmap const&, Stretch, GrUniqueKey const&, GrUniqueKey const&) (+0x1ca)
GrRefCachedBitmapTexture(GrContext*, SkBitmap const&, GrTextureParams const*) (+0x368)
AutoBitmapTexture::set(GrContext*, SkBitmap const&, GrTextureParams const*) (+0x87)
AutoBitmapTexture::AutoBitmapTexture(GrContext*, SkBitmap const&, GrTextureParams const*, GrTexture**) (+0xe0)
AutoBitmapTexture::AutoBitmapTexture(GrContext*, SkBitmap const&, GrTextureParams const*, GrTexture**) (+0x35)
SkGpuDevice::internalDrawBitmap(SkBitmap const&, SkMatrix const&, SkRect const&, GrTextureParams const&, SkPaint const&, SkCanvas::DrawBitmapRectFlags, bool, bool) (+0x118)
SkGpuDevice::drawBitmapCommon(SkDraw const&, SkBitmap const&, SkRect const*, SkSize const*, SkPaint const&, SkCanvas::DrawBitmapRectFlags) (+0xa84)
SkGpuDevice::drawBitmapRect(SkDraw const&, SkBitmap const&, SkRect const*, SkRect const&, SkPaint const&, SkCanvas::DrawBitmapRectFlags) (+0x2bb)
SkCanvas::internalDrawBitmapRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags) (+0x2a9)
SkCanvas::onDrawBitmapRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags) (+0x118)
SkCanvas::drawBitmapRectToRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags) (+0x60)
void SkRecords::Draw::draw<SkRecords::DrawBitmapRectToRect>(SkRecords::DrawBitmapRectToRect const&) (+0x8a)
void SkRecords::Draw::operator()<SkRecords::DrawBitmapRectToRect>(SkRecords::DrawBitmapRectToRect const&) (+0x1d)
void SkRecord::Record::visit<void, SkRecords::Draw>(SkRecord::Type8, SkRecords::Draw&) const (+0x298)
void SkRecord::visit<void, SkRecords::Draw>(unsigned int, SkRecords::Draw&) const (+0xbc)
SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) (+0x2eb)
SkPicture::playback(SkCanvas*, SkPicture::AbortCallback*) const (+0x186)
SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) (+0xe0)
SkCanvas::drawPicture(SkPicture const*) (+0x11b)
DM::SKPSrc::draw(SkCanvas*) const (+0x25b)
DM::GPUSink::draw(DM::Src const&, SkBitmap*, SkWStream*, SkString*) const (+0x21d)
Task::Run(Task*) (+0x1de)
run_enclave(SkTArray<Task, false>*) (+0x49)
run_enclave_and_gpu_tests(SkTArray<Task, false>*) (+0x15)
(anonymous namespace)::ThreadPool::Wait(int*) (+0x14b)
SkTaskGroup::wait() (+0x15)
dm_main() (+0x624)
main (+0x27)

Original issue's description:
> DM: lazy decoding on SKP playback
>
> Command `out/Release/dm --config pdf --src gm skp`, uses 27% less RAM.
>
> Committed: https://skia.googlesource.com/skia/+/77d366d72a6ae83fb0abcb2ec7e2d692fef2e923

TBR=mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoDM: lazy decoding on SKP playback
halcanary [Mon, 23 Feb 2015 18:28:03 +0000 (10:28 -0800)]
DM: lazy decoding on SKP playback

Command `out/Release/dm --config pdf --src gm skp`, uses 27% less RAM.

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

9 years agoRemove unnecessary include of gles2 header in SkANGLEGLContext.h
bsalomon [Mon, 23 Feb 2015 18:06:44 +0000 (10:06 -0800)]
Remove unnecessary include of gles2 header in SkANGLEGLContext.h

TBR=robertphillips@google.com

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

9 years agoSketch SkPMFloat
mtklein [Mon, 23 Feb 2015 18:04:34 +0000 (10:04 -0800)]
Sketch SkPMFloat

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/50d2b3114b3e59dc84811881591bf25b2c1ecb9f

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu13.10-GCC4.8-Arm7-Release-Android_Neon-Trybot

http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu13.10-GCC4.8-Arm7-Release-Android_Neon/builds/2120/steps/build%20most/logs/stdio

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

9 years agoUse #if instead of #ifdef with SK_HAS_DWRITE_X.
bungeman [Mon, 23 Feb 2015 18:02:49 +0000 (13:02 -0500)]
Use #if instead of #ifdef with SK_HAS_DWRITE_X.

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

9 years agoAdd stencil buffer create tracking to GPU stats.
bsalomon [Mon, 23 Feb 2015 18:01:36 +0000 (10:01 -0800)]
Add stencil buffer create tracking to GPU stats.

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

9 years agoRevert of Sketch SkPMFloat (patchset #15 id:270001 of https://codereview.chromium...
mtklein [Mon, 23 Feb 2015 17:44:34 +0000 (09:44 -0800)]
Revert of Sketch SkPMFloat (patchset #15 id:270001 of https://codereview.chromium.org/936633002/)

Reason for revert:
http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu13.10-GCC4.8-Arm7-Release-Android_Neon/builds/2120/steps/build%20most/logs/stdio

Original issue's description:
> Sketch SkPMFloat
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/50d2b3114b3e59dc84811881591bf25b2c1ecb9f

TBR=reed@google.com,msarrett@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoUse IDWriteFontFallback when available.
bungeman [Mon, 23 Feb 2015 17:41:43 +0000 (09:41 -0800)]
Use IDWriteFontFallback when available.

This is prefereable to the current IDWriteTextLayout method,
but is only available on Windows 8.1 and later.

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

9 years agoSketch SkPMFloat
mtklein [Mon, 23 Feb 2015 17:39:27 +0000 (09:39 -0800)]
Sketch SkPMFloat

BUG=skia:

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

9 years agoDon't require AA in order to use shader-based clips
bsalomon [Mon, 23 Feb 2015 17:28:30 +0000 (09:28 -0800)]
Don't require AA in order to use shader-based clips

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

9 years agoclear stencil buffer using special purpose FBO
bsalomon [Mon, 23 Feb 2015 17:27:45 +0000 (09:27 -0800)]
clear stencil buffer using special purpose FBO

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

9 years agoDynamically create stencil buffer when needed.
bsalomon [Mon, 23 Feb 2015 17:06:38 +0000 (09:06 -0800)]
Dynamically create stencil buffer when needed.

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

9 years agoUse D3D11 backend for ANGLE when available.
bsalomon [Mon, 23 Feb 2015 16:57:23 +0000 (08:57 -0800)]
Use D3D11 backend for ANGLE when available.

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

9 years agoDefault path renderer batch
joshualitt [Mon, 23 Feb 2015 16:44:31 +0000 (08:44 -0800)]
Default path renderer batch

BUG=skia:

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

9 years agoRemove SkFontHost includes and friends.
bungeman [Mon, 23 Feb 2015 16:25:00 +0000 (08:25 -0800)]
Remove SkFontHost includes and friends.

SkFontHost no longer exists as a class, so remove the includes and stop
making it a friend.

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

9 years agoremove dead code (covered by surfaceprops)
reed [Mon, 23 Feb 2015 15:37:40 +0000 (07:37 -0800)]
remove dead code (covered by surfaceprops)

BUG=skia:

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

9 years agoRevert of non-aa rects batch (patchset #6 id:90001 of https://codereview.chromium...
joshualitt [Mon, 23 Feb 2015 15:35:35 +0000 (07:35 -0800)]
Revert of non-aa rects batch (patchset #6 id:90001 of https://codereview.chromium.org/931293002/)

Reason for revert:
breaks angle

Original issue's description:
> non-aa rects batch
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/ee72dde696b35534465c14f6b4c5bfca44a2f63e

TBR=robertphillips@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agonon-aa rects batch
joshualitt [Mon, 23 Feb 2015 15:16:10 +0000 (07:16 -0800)]
non-aa rects batch

BUG=skia:

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

9 years agoRemove SK_SUPPORT_LEGACY_GET_PIXELS_ENUM.
scroggo [Mon, 23 Feb 2015 15:07:25 +0000 (07:07 -0800)]
Remove SK_SUPPORT_LEGACY_GET_PIXELS_ENUM.

SK_SUPPORT_LEGACY_GET_PIXELS_ENUM just set a \#define to convert
onGetPixelsEnum
to
onGetPixels

Now that Chrome has been updated to override onGetPixels, there is no
need for the define.

BUG=skia:3257

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

9 years agoRoll ANGLE
bsalomon [Mon, 23 Feb 2015 14:57:54 +0000 (06:57 -0800)]
Roll ANGLE

TBR=egdaniel@google.com

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

9 years agomake strokes3 full size
caryclark [Mon, 23 Feb 2015 14:51:04 +0000 (06:51 -0800)]
make strokes3 full size

The strokes3 test was limted to 400x800. Allow the captured gm to
go to 1500x1500, and shift it down slightly so it isn't clipped.

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

9 years agoSwap render target instead of creating a new gpu device for surface copy-on-write
kkinnunen [Mon, 23 Feb 2015 06:53:44 +0000 (22:53 -0800)]
Swap render target instead of creating a new gpu device for surface copy-on-write

Swap render target of the gpu device instead of creating a new gpu
device when making a copy-on-write upon surface modification.

This removes the SkCanvas::setRootDevice which contains problematic code
when trying to increase the use of SkImages internally in Skia.

BUG=skia:3388

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

9 years agoUpdate SKP version
skia.buildbots [Sun, 22 Feb 2015 09:11:27 +0000 (01:11 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agomove GMSampleView into its own cpp
reed [Sat, 21 Feb 2015 17:36:50 +0000 (09:36 -0800)]
move GMSampleView into its own cpp

BUG=skia:
TBR=

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

9 years agoremove dead code from sampleapp, trim bad asserts
reed [Sat, 21 Feb 2015 17:03:20 +0000 (09:03 -0800)]
remove dead code from sampleapp, trim bad asserts

BUG=skia:
TBR=

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

9 years ago[SVGDevice] Text whitespace unittest
fmalita [Fri, 20 Feb 2015 21:54:40 +0000 (13:54 -0800)]
[SVGDevice] Text whitespace unittest

Plumb SkDOM as needed to make it suitable for an SkXMLWriter backend.

Also fix a potential null typeface issue in
SkSVGDevice::AutoElement::addTextAttributes().

R=reed@google.com,mtklein@google.com

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

9 years agoPDF: remove unnecessary mutexes.
halcanary [Fri, 20 Feb 2015 20:45:50 +0000 (12:45 -0800)]
PDF: remove unnecessary mutexes.

We now force all SkPDFObjects to stay on one thread.

TBR=mtklein@google.com

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

9 years agoImplement onMatchFamilyStyleCharacter for DirectWrite.
bungeman [Fri, 20 Feb 2015 20:45:44 +0000 (12:45 -0800)]
Implement onMatchFamilyStyleCharacter for DirectWrite.

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

9 years agoRemove historical assert in AAConvexPathRenderer
joshualitt [Fri, 20 Feb 2015 20:40:45 +0000 (12:40 -0800)]
Remove historical assert in AAConvexPathRenderer

BUG=skia:

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

9 years agoMake SkPixelRef::isLocked() debug-only, remove related dead code.
mtklein [Fri, 20 Feb 2015 20:40:40 +0000 (12:40 -0800)]
Make SkPixelRef::isLocked() debug-only, remove related dead code.

DM's okay locally with no diffs, no failures.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/8e65712486c66108677a9b0a55ad3e7ca94db555

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

9 years agoEnable override keyword for GCC versions >= 4.7
djsollen [Fri, 20 Feb 2015 20:35:37 +0000 (12:35 -0800)]
Enable override keyword for GCC versions >= 4.7

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

9 years agoPort GrGLCaps over to use SkTHash.
mtklein [Fri, 20 Feb 2015 20:35:32 +0000 (12:35 -0800)]
Port GrGLCaps over to use SkTHash.

I've written some new hashtable interfaces that should be easier to use,
and I've been trying to roll them out bit by bit, hopefully replacing
SkTDynamicHash, SkTMultiMap, SkTHashCache, etc.

This turns the cache in GrGLCaps::readPixelsSupported() into an SkTHashMap,
mapping the format key to a bool.  Functionally, it's the same.

BUG=skia:

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

9 years agoFix layer hoisting bug in SkCanvas::drawPicture path
robertphillips [Fri, 20 Feb 2015 20:30:26 +0000 (12:30 -0800)]
Fix layer hoisting bug in SkCanvas::drawPicture path

Most of this CL is just reordering to better match the MultiPictureDraw variant. The only functional change is that we now use the device space bounds as the queryRect to the layer hoisting code. This is necessary since the layer hoisting does all its work in device space.

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

9 years agoUse simpler SkTHashSet in DM to store reference gold
mtklein [Fri, 20 Feb 2015 20:30:19 +0000 (12:30 -0800)]
Use simpler SkTHashSet in DM to store reference gold

It's simpler and doesn't leak the gold anymore.

BUG=skia:

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

9 years agoPDF: Now threadsafe!
halcanary [Fri, 20 Feb 2015 15:21:05 +0000 (07:21 -0800)]
PDF: Now threadsafe!

The PDF canvas is now just as threadsafe as any other Skia canvas.

DM updated to thread PDF tests.

SkDocument_PDF now owns SkPDFCanon, and pointers to that canon are
passed around to all classes that need access to the canon.

BUG=skia:2683

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

9 years agoRound stencil buffers dims up to next pow2 when allowed
bsalomon [Fri, 20 Feb 2015 14:58:13 +0000 (06:58 -0800)]
Round stencil buffers dims up to next pow2 when allowed

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

9 years agoThis uses quad approximations of the outer and inner paths describing a stroke. Cubic...
caryclark [Fri, 20 Feb 2015 14:33:57 +0000 (06:33 -0800)]
This uses quad approximations of the outer and inner paths describing a stroke. Cubics and conics' thick strokes are approximated with quads as well.

The approximation uses a similar error term as the fill scan converter to determine the number of quads to use.

This also updates SampleApp QuadStroker test with conics, ovals, and stroked text.

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

9 years agoPDF : New factory function for SkPDFDevice
halcanary [Fri, 20 Feb 2015 14:17:26 +0000 (06:17 -0800)]
PDF : New factory function for SkPDFDevice

SkPDFDevice now has factory function that matches what callers need.

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

9 years agoPDF: remove unused SkPDFDevice::setDCTEncoder()
halcanary [Fri, 20 Feb 2015 13:57:11 +0000 (05:57 -0800)]
PDF: remove unused SkPDFDevice::setDCTEncoder()

All image compression currently uses (losseless) Deflate, not
Jpeg.  See http://crrev.com/935843007

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

9 years agoRevert of Make SkPixelRef::isLocked() debug-only, remove related dead code. (patchset...
reed [Fri, 20 Feb 2015 04:00:33 +0000 (20:00 -0800)]
Revert of Make SkPixelRef::isLocked() debug-only, remove related dead code. (patchset #1 id:1 of https://codereview.chromium.org/940083002/)

Reason for revert:
Broke callers in chrome

../../skia/ext/platform_canvas_unittest.cc:421:56: error: no member named 'isLocked' in 'SkPixelRef'
  EXPECT_TRUE(platform_bitmap->GetBitmap().pixelRef()->isLocked());

Original issue's description:
> Make SkPixelRef::isLocked() debug-only, remove related dead code.
>
> DM's okay locally with no diffs, no failures.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8e65712486c66108677a9b0a55ad3e7ca94db555

TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoPDF: Remove SkPDFDeviceFlattener
halcanary [Fri, 20 Feb 2015 02:55:05 +0000 (18:55 -0800)]
PDF: Remove SkPDFDeviceFlattener

There are no clients.

TBR=mtklein@google.com

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

9 years agoRemove unused parameters to SkDocument::CreatePDF
halcanary [Fri, 20 Feb 2015 02:50:05 +0000 (18:50 -0800)]
Remove unused parameters to SkDocument::CreatePDF

All image compression currently uses (losseless) Deflate, not Jpeg.

All clients simply use SkDocument::CreatePDF(stream).

SampleApp and SkLua still use SkDocument::CreatePDF(path).

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

9 years agoMake SkPixelRef::isLocked() debug-only, remove related dead code.
mtklein [Fri, 20 Feb 2015 02:50:00 +0000 (18:50 -0800)]
Make SkPixelRef::isLocked() debug-only, remove related dead code.

DM's okay locally with no diffs, no failures.

BUG=skia:

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

9 years agoRename onGetPixelsEnum back to onGetPixels.
scroggo [Fri, 20 Feb 2015 02:44:58 +0000 (18:44 -0800)]
Rename onGetPixelsEnum back to onGetPixels.

Replace the old signature of onGetPixels (return bool) to return an
enum (Result). Remove onGetPixelsEnum.

Add a define for onGetPixelsEnum to onGetPixels. This is for staging
in Chromium, where some implementations override onGetPixelsEnum.

Add the define in skia_for_chromium_defines. Remove
SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN, which is no longer needed by
Chromium.

BUG=skia:3257

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

9 years ago[SkSVGDevice] Fix whitespace text handling
fmalita [Fri, 20 Feb 2015 02:44:51 +0000 (18:44 -0800)]
[SkSVGDevice] Fix whitespace text handling

SVG ignores leading/trailing whitespace and consolidates mid-text
(http://www.w3.org/TR/SVG/text.html#WhiteSpace). This can cause our
x/y position indices to get out of whack.

Implement a text builder which is SVG whitespace-munging-aware and
performs the needed x/y position list adjustments.

R=reed@google.com,mtklein@google.com

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

9 years agouse geometric ave for choosing mip level
reed [Fri, 20 Feb 2015 02:39:49 +0000 (18:39 -0800)]
use geometric ave for choosing mip level

requires https://codereview.chromium.org/937233002/

BUG=skia:

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

9 years agoAllow either the old or new version of ADB on mac.
djsollen [Fri, 20 Feb 2015 02:39:40 +0000 (18:39 -0800)]
Allow either the old or new version of ADB on mac.

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

9 years agoSpeculative fix for nexus player unit test failure
bsalomon [Thu, 19 Feb 2015 20:05:58 +0000 (12:05 -0800)]
Speculative fix for nexus player unit test failure

TBR=robertphillips@google.com

NOTREECHECKS=true

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

9 years agogm to illustrate mipmap layer choice
reed [Thu, 19 Feb 2015 19:39:46 +0000 (11:39 -0800)]
gm to illustrate mipmap layer choice

BUG=skia:
NOTREECHECKS=True
TBR=

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

9 years agoHandle the case when the GrResourceCache timestamp wraps.
bsalomon [Thu, 19 Feb 2015 19:38:44 +0000 (11:38 -0800)]
Handle the case when the GrResourceCache timestamp wraps.

NOTREECHECKS=true

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

9 years agogm to test hairlines which fill RenderTarget
joshualitt [Thu, 19 Feb 2015 18:25:21 +0000 (10:25 -0800)]
gm to test hairlines which fill RenderTarget

BUG=skia:

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

9 years agoRecycle stencil buffers across render targets.
bsalomon [Thu, 19 Feb 2015 17:09:00 +0000 (09:09 -0800)]
Recycle stencil buffers across render targets.

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

9 years agoRevert of notify resource caches when pixelref genID goes stale (patchset #4 id:60001...
mtklein [Thu, 19 Feb 2015 16:53:52 +0000 (08:53 -0800)]
Revert of notify resource caches when pixelref genID goes stale (patchset #4 id:60001 of https://codereview.chromium.org/825263005/)

Reason for revert:
Crazy failures.

http://build.chromium.org/p/client.skia/builders/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug/builds/1428/steps/dm/logs/stdio

Original issue's description:
> notify resource caches when pixelref genID goes stale
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4675819b9dbb3ad71ec851776e5de26d342f29fe

TBR=bsalomon@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoPDF: why do we have flags no one uses (or can use)?
mtklein [Thu, 19 Feb 2015 16:29:24 +0000 (08:29 -0800)]
PDF: why do we have flags no one uses (or can use)?

BUG=skia:

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

9 years agoUpdate fontcache gm to actually stress font atlas
jvanverth [Thu, 19 Feb 2015 16:28:02 +0000 (08:28 -0800)]
Update fontcache gm to actually stress font atlas

BUG=skia:

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

9 years agoAllow resources' unique keys to be changed.
bsalomon [Thu, 19 Feb 2015 16:24:16 +0000 (08:24 -0800)]
Allow resources' unique keys to be changed.

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

9 years agonotify resource caches when pixelref genID goes stale
reed [Thu, 19 Feb 2015 16:22:54 +0000 (08:22 -0800)]
notify resource caches when pixelref genID goes stale

BUG=skia:

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

9 years agoRevert of disable gammatext gm for a while, looking for other flakes (patchset #1...
bungeman [Thu, 19 Feb 2015 15:45:14 +0000 (07:45 -0800)]
Revert of disable gammatext gm for a while, looking for other flakes (patchset #1 id:1 of https://codereview.chromium.org/725303002/)

Reason for revert:
We now have gold!!!

Original issue's description:
> disable gammatext gm for a while, looking for other flakes
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/64c04882701d9ee3bbbf23d8c02c8d96c5a51719

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoClarify desired behavior of FontConfigTypeface::LegacyCreateTypeface.
bungeman [Thu, 19 Feb 2015 15:29:28 +0000 (07:29 -0800)]
Clarify desired behavior of FontConfigTypeface::LegacyCreateTypeface.

This should have no real effect on behavior, but cleans up some names
and removes an unused parameter. This is a step toward separating the
SkTypeface cache from the request cache.

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

9 years agomove SkPDFD*.h from include to src
halcanary [Thu, 19 Feb 2015 15:26:12 +0000 (07:26 -0800)]
move SkPDFD*.h from include to src

CQ_INCLUDE_TRYBOTS=client.skia:Mac Builder-Trybot,Linux Builder-Trybot,Win Builder-Trybot

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

9 years agoRename GrContentKey to GrUniqueKey
bsalomon [Thu, 19 Feb 2015 15:24:21 +0000 (07:24 -0800)]
Rename GrContentKey to GrUniqueKey

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

9 years agoDo not clear the source device in SkGpuDevice::drawDevice
kkinnunen [Thu, 19 Feb 2015 15:20:40 +0000 (07:20 -0800)]
Do not clear the source device in SkGpuDevice::drawDevice

Do not clear the source device in SkGpuDevice::drawDevice based on
the status whether the destination device needs a clear.

Source device clear is flushed in SkGpuDevice::accessRenderTarget()
and target device clear is flushed in CHECK_SHOULD_DRAW(draw).

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

9 years agoAvoid wrong memory access due to double substitution and %%
kkinnunen [Thu, 19 Feb 2015 14:32:12 +0000 (06:32 -0800)]
Avoid wrong memory access due to double substitution and %%

Use the form SkDebugf("%s", arbitraryString) instead of
SkDebugf(arbitraryString).

Fixes the case where SkString::appendf-ing a string with "%%" and then
printing the string with SkDebugf would cause uninitialized read and
corrupted debug print.

ninja -C out/Debug tools && valgrind --leak-check=full
./out/Debug/render_pictures --config gpu  -w q -r ...

...

==7307== Conditional jump or move depends on uninitialised value(s)
==7307==    at 0x6908475: __printf_fp (printf_fp.c:1180)
==7307==    by 0x6904267: vfprintf (vfprintf.c:1629)
==7307==    by 0x6906E53: buffered_vfprintf (vfprintf.c:2313)
==7307==    by 0x690188D: vfprintf (vfprintf.c:1316)
==7307==    by 0x67E8F5: SkDebugf(char const*, ...) (SkDebug_stdio.cpp:18)
==7307==    by 0x7983F1: GrContext::printCacheStats() const (GrTest.cpp:54)
==7307==    by 0x408ECF: tool_main(int, char**) (render_pictures_main.cpp:480)
==7307==    by 0x40913E: main (render_pictures_main.cpp:511)
==7307==
Budget: 2048 items 100663296 bytes
Entry Count: current 652 (651 budgeted, 0 wrapped, 297 locked, 638 scratch 32 0.000000ull), high 652
Entry Bytes: current 51087658 (budgeted 49826658, 49 0.000000ull, 1261000 unbudgeted) high 51087658

(observe "ull" instead of "% full")

(from mtklein)
This CL is not editing public API.
TBR=reed@google.com

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

9 years agoFixing possible out of bound memory access
sugoi [Thu, 19 Feb 2015 13:32:08 +0000 (05:32 -0800)]
Fixing possible out of bound memory access

This was a bug found by ASAN. When width is very small, we can have something like width == 1 and rowBytes == 8. Using "2 * yWidth" (2) would be smaller than rowBytesY (8), so we could read memory out of bounds. This issue has a separate fix in blink (crbug.com/458861).

BUG=skia:

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

9 years agoRemove FontConfigTypeface::getFamilyName().
bungeman [Wed, 18 Feb 2015 21:22:26 +0000 (13:22 -0800)]
Remove FontConfigTypeface::getFamilyName().

This method is hiding a method of the same name from the superclass.
This is confusing and error prone, and doesn't really add anything.

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

9 years agomanaging chromes use section of docs
hcm [Wed, 18 Feb 2015 20:56:40 +0000 (12:56 -0800)]
managing chromes use section of docs

BUG=skia:

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

9 years agoRuntime configuration section of docs
hcm [Wed, 18 Feb 2015 20:55:04 +0000 (12:55 -0800)]
Runtime configuration section of docs

Preview here: http://skiadocs.com:8000/dev/runtime/?cl=940663002

BUG=skia:

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

9 years agoPass Rendertarget into context.
joshualitt [Wed, 18 Feb 2015 20:29:52 +0000 (12:29 -0800)]
Pass Rendertarget into context.

Adding Jim for text context stuff, and Steven for image blur stuff.

BUG=skia:

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

9 years agoUse uint16s for texture coordinates when rendering text.
jvanverth [Wed, 18 Feb 2015 19:36:35 +0000 (11:36 -0800)]
Use uint16s for texture coordinates when rendering text.

Allows us to push more vertices into a given vertex buffer, with
a slight performance improvement.

Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b

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

9 years agoUse SkAutoSTMalloc in GrResourceKey
bsalomon [Wed, 18 Feb 2015 19:33:04 +0000 (11:33 -0800)]
Use SkAutoSTMalloc in GrResourceKey

TBR=robertphillips@google.com

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

9 years agoPDF: Add (low-memory) SkPDFBitmap class
halcanary [Wed, 18 Feb 2015 19:29:56 +0000 (11:29 -0800)]
PDF: Add (low-memory) SkPDFBitmap class

Also: Add SkDeflateWStream and associated unit tests.

SkPDFBitmap is a replacement for SkPDFImage.  As of now, it only
supports 8888 bitmaps (the most common case).

SkPDFBitmap takes very little extra memory (aside from refing the
bitmap's pixels), and its emitObject() does not cache any data.

The SkPDFBitmap::Create function will check the canon for duplicates.
This can reduce the size of the output PDF.

Motivation:  this gives another ~40% decrease in PDF memory overhead

TODO: Support other ColorTypes and scrap SkPDFImage.

BUG=skia:3030

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

9 years agoUpdate DirectWrite streams to SkStreamAsset.
bungeman [Wed, 18 Feb 2015 19:01:05 +0000 (11:01 -0800)]
Update DirectWrite streams to SkStreamAsset.

SkTypefaces now deal in terms of SkStreamAsset, but the DirectWrite port
was never fully converted.

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

9 years agoRemove Chromium staging in SkDrawCommand
robertphillips [Wed, 18 Feb 2015 18:56:05 +0000 (10:56 -0800)]
Remove Chromium staging in SkDrawCommand

This cannot land until https://codereview.chromium.org/917063008/ (Cleanup lingering scaffolding for Skia change) has landed.

TBR=joshualitt@chromium.org

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

9 years agoupdate sampleapp for stroking experiment
caryclark [Wed, 18 Feb 2015 18:56:00 +0000 (10:56 -0800)]
update sampleapp for stroking experiment

Add RotateCircles3 back as better-named QuadStroker.

Switch pathfill test to call skia before draw instead of in
initializer to avoid triggering debugging breakpoints.

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

9 years agoExpose method to retrieve CTFont
dominik.rottsches [Wed, 18 Feb 2015 18:50:58 +0000 (10:50 -0800)]
Expose method to retrieve CTFont

BUG=skia:3351
R=bungeman@chromium.org

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

9 years agoMake SkImage::getTexture() const
kkinnunen [Wed, 18 Feb 2015 18:50:52 +0000 (10:50 -0800)]
Make SkImage::getTexture() const

Make SkImage::getTexture() const. At the moment the function
does not mutate the state.

One use-case is that this makes it possible in the future to add draw
function to SkBaseDevice functions. The device draw functions take
const ref objects, but SkGpuDevice likely would benefit of using the
getTexture().

BUG=skia:3388
R=reed@google.com

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

9 years agofix xcode build
mtklein [Wed, 18 Feb 2015 17:35:49 +0000 (09:35 -0800)]
fix xcode build

NOTREECHECKS=true

BUG=skia:

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

9 years agoRevert of Use uint16s for texture coordinates when rendering text. (patchset #5 id...
reed [Wed, 18 Feb 2015 02:38:38 +0000 (18:38 -0800)]
Revert of Use uint16s for texture coordinates when rendering text. (patchset #5 id:80001 of https://codereview.chromium.org/917373002/)

Reason for revert:
speculative revert for DEPS failures

https://codereview.chromium.org/932973002/

Original issue's description:
> Use uint16s for texture coordinates when rendering text.
>
> Allows us to push more vertices into a given vertex buffer, with
> a slight performance improvement.
>
> Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b

TBR=joshualitt@google.com,robertphillips@google.com,bsalomon@google.com,reed@google.com,djsollen@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoUse an array of nonpurgeable resources in GrResourceCache
bsalomon [Tue, 17 Feb 2015 23:09:34 +0000 (15:09 -0800)]
Use an array of nonpurgeable resources in GrResourceCache

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

9 years agozlib/pdf: remove HaveFlate(), depend on preprocessor defines
halcanary [Tue, 17 Feb 2015 22:43:06 +0000 (14:43 -0800)]
zlib/pdf: remove HaveFlate(), depend on preprocessor defines

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

9 years agoDM: move ext into key
mtklein [Tue, 17 Feb 2015 21:18:04 +0000 (13:18 -0800)]
DM: move ext into key

BUG=skia:

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

9 years agoSK_NO_FLATE
mtklein [Tue, 17 Feb 2015 21:10:43 +0000 (13:10 -0800)]
SK_NO_FLATE

Also remove skia_zlib_static.  We're not using it.  We don't even have zlib in DEPS.

No public API changes.
TBR=reed@google.com

BUG=skia:

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

9 years agoMake GrResourceCache use a priority queue of purgeable resources.
bsalomon [Tue, 17 Feb 2015 19:47:40 +0000 (11:47 -0800)]
Make GrResourceCache use a priority queue of purgeable resources.

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

9 years agoadd gm for path-arcs, and catch degenerate arc in conic-case
reed [Tue, 17 Feb 2015 19:43:14 +0000 (11:43 -0800)]
add gm for path-arcs, and catch degenerate arc in conic-case

BUG=skia:3428

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

9 years agoDecrease number of allowed stages for Angle on GLProgramTest
egdaniel [Tue, 17 Feb 2015 19:18:38 +0000 (11:18 -0800)]
Decrease number of allowed stages for Angle on GLProgramTest

BUG=skia:3435

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

9 years agoUse dst copies in porter duffer XP to correctly render certain blends.
egdaniel [Tue, 17 Feb 2015 19:15:47 +0000 (11:15 -0800)]
Use dst copies in porter duffer XP to correctly render certain blends.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/997c6358d94e188b1a7b89a4f86e24cbe0f5a164

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

9 years agoSuggested version with 'undo'.
mtklein [Tue, 17 Feb 2015 19:13:33 +0000 (11:13 -0800)]
Suggested version with 'undo'.

BUG=skia:

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

9 years agouse common impl for drawTextOnPath
reed [Tue, 17 Feb 2015 18:33:54 +0000 (10:33 -0800)]
use common impl for drawTextOnPath

BUG=skia:

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

9 years agoRemove SK_SUPPORT_LEGACY_ADDRRECT
fmalita [Tue, 17 Feb 2015 17:25:49 +0000 (09:25 -0800)]
Remove SK_SUPPORT_LEGACY_ADDRRECT

The flag is no longer used in Chromium.

BUG=458898
R=reed@google.com,robertphillips@google.com

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

9 years agoRemove SK_SUPPORT_LEGACY_CONIC_COMPUTE_QUAD_POW2
fmalita [Tue, 17 Feb 2015 17:18:33 +0000 (09:18 -0800)]
Remove SK_SUPPORT_LEGACY_CONIC_COMPUTE_QUAD_POW2

The flag is no longer used in Chromium.

BUG=458898
R=reed@google.com,robertphillips@google.com

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

9 years agoImprove GrInOrderDrawBuffer::Cmd encapsulation
robertphillips [Tue, 17 Feb 2015 17:14:33 +0000 (09:14 -0800)]
Improve GrInOrderDrawBuffer::Cmd encapsulation

In preparation for moving all the Cmds out of GrInOrderDrawBuffer.

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

9 years agoFix broken build due to updated #define
djsollen [Tue, 17 Feb 2015 17:09:53 +0000 (09:09 -0800)]
Fix broken build due to updated #define

TBR=scroggo@google.com

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

9 years agoUse uint16s for texture coordinates when rendering text.
jvanverth [Tue, 17 Feb 2015 16:39:56 +0000 (08:39 -0800)]
Use uint16s for texture coordinates when rendering text.

Allows us to push more vertices into a given vertex buffer, with
a slight performance improvement.

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

9 years agoRemove android specific srcPath from SkPath
djsollen [Tue, 17 Feb 2015 16:06:32 +0000 (08:06 -0800)]
Remove android specific srcPath from SkPath

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

9 years agoFix skia bug 2845
kui.zheng [Tue, 17 Feb 2015 16:01:52 +0000 (08:01 -0800)]
Fix skia bug 2845

Shouldn't call Fast Blur path(DoubleRowBoxBlur_NEON)
when kernelsize is 1. Or, uint16x8_t resultPixels will be overflow.

BUG=skia:2845
R=senorblanco@chromium.org

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