Commit Graph

5041 Commits

Author SHA1 Message Date
mtklein
449d9b7e2d simplify code in SkRecords.h
- use C++11 features ({} init, move constructors) to eliminate the need
     for explicit constructors
   - collapse RECORD0...RECORD8 into just one RECORD macro
   - explicitly tag record types instead of using member detectors.

Removing member detectors makes this code significantly less fragile.

This exposes a few places where we didn't really think through what to do
with SkDrawable.  I've marked them TODO for now.

BUG=skia:

Review URL: https://codereview.chromium.org/1360943003
2015-09-28 10:33:02 -07:00
reed
c9e190ddac Revert of change pixel-serializer to support reencoding existing data (patchset #5 id:80001 of https://codereview.chromium.org/1373683003/ )
Reason for revert:
Need to somehow get access to encoders in chrome -- link error on the roll since SkImageEncoder is not built as part of chrome.

Original issue's description:
> change pixel-serializer to support reencoding existing data
>
> Trying to evolve this interface so it can
> - support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
> - allow for encoding images as well as bitmaps (e.g. for picture serialization)
> - perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/13f48dc85aa68a60da66aaf39c93d527d11d1278

TBR=scroggo@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1371983003
2015-09-28 09:58:41 -07:00
herb
0869267a7c Add cast and assignment operators to SkAtomic.
This is not really an API change.

TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1369333002
2015-09-28 08:59:18 -07:00
reed
13f48dc85a change pixel-serializer to support reencoding existing data
Trying to evolve this interface so it can
- support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
- allow for encoding images as well as bitmaps (e.g. for picture serialization)
- perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)

BUG=skia:

Review URL: https://codereview.chromium.org/1373683003
2015-09-28 08:58:53 -07:00
bsalomon
f1b7a1d828 Make skpaint->grpaint flow work for composing draws (verts and atlas)
One side effect is that the SkShader's (or implicit shader's) fragment processor is responsible for the transition from an unpremul paint color to a premul color.

Review URL: https://codereview.chromium.org/1348583002
2015-09-28 06:26:29 -07:00
fmalita
2f5891ea64 Remove SkBitmapSource
To avoid breaking existing SKPs, add a deserialization stub which
unflattens SkBitmapSource records to SkImageSources.

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

Review URL: https://codereview.chromium.org/1363913002
2015-09-25 09:15:55 -07:00
reed
d114645d93 SkInstallDiscardablePixelRef is deprecated, enforce that
No functionality change, just a renaming.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1372593002
2015-09-25 06:56:57 -07:00
mdempsky
00d6e515e5 Eliminate some clutter in SkFlattenable
The Registrar class is unnecessary, as SkFlattenable factory
registration is now handled via initialization routines that can just
call the Register function directly.

Also, no need to lazily initialize gCount to 0, as initializing an int
to a constant value does not require dynamic initialization.  (C++
actually guarantees zero initialization of global ints anyway, but
existing practice in Skia appears to favor the explicit "= 0").

Relatedly, this requires removing the unused/unimplemented
SkLayerDrawLooper::MyRegistrar class.  And removing that allows Clang
to realize that SkLayerDrawLooper::fTopRec is unneeded too, so remove
that too to squelch the compiler warning/error.

This doesn't change any public API.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1361323002
2015-09-24 15:04:45 -07:00
fmalita
3f9deab9fc Remove SkImage::newImage()
All clients converted to newSubset().

R=reed@google.com

Review URL: https://codereview.chromium.org/1364263002
2015-09-24 07:43:41 -07:00
herb
7f0a3d7523 Make mutex semaphore based.
This implementation improves performance of SkMutex acquire / release pair from 42ns -> 13 ns.

SkSharedMutex and SkSpinlock have the same performance.

It also removes specialized windows and linux/mac code.

BUG=skia:

Review URL: https://codereview.chromium.org/1359733002
2015-09-24 07:34:49 -07:00
reed
7b6945bc4e remove unused (by the outside) SkImage::newSurface, and simplify newImage -> newSubset
BUG=skia:

Review URL: https://codereview.chromium.org/1364443002
2015-09-24 00:50:58 -07:00
halcanary
f12a1673f0 SkPDF: add basic metadata support
Motivation: I want too finalize this API before working on the more
complex problem of adding XMP metadata for PDF/A.

BUG=skia:3110

Review URL: https://codereview.chromium.org/1359943003
2015-09-23 12:45:49 -07:00
hendrikw
6f0fdac9e7 skia: Add support for ANGLE on linux
This will allow the ANGLE guys to test the ANGLE gl backend
with nanobench and DM

Review URL: https://codereview.chromium.org/1343193005
2015-09-23 11:35:55 -07:00
bsalomon
aca31fea8c Stop supporting HW dither
Review URL: https://codereview.chromium.org/1359833004
2015-09-22 11:38:46 -07:00
mdempsky
07ed41fa40 Fix possible integer overflow in SkTSearch's midpoint calculation
Probably unlikely to matter in practice, but SkTQSort calculates its
midpoint correctly, so we might as well do it here too.  For more
background, see Joshua Bloch's "Nearly All Binary Searches and
Mergesorts are Broken" post:
http://googleresearch.blogspot.ru/2006/06/extra-extra-read-all-about-it-nearly.html

This doesn't change any public API.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1362613002
2015-09-22 10:32:02 -07:00
bsalomon
87ba62e67c Replace GrExtractAlphaFragmentProcessor with DstIn compose processor
Review URL: https://codereview.chromium.org/1347943003
2015-09-22 06:42:00 -07:00
mdempsky
106b12427e Remove SkNEW and SkDELETE macros
This CL removes the uses of SkNEW that have resprouted since commit
385fe4d, and removes the macros entirely now that Android and Chromium
have been cleaned up to no longer depend on them.

A bunch of files implicitly depend on #include <new> from SkPostConfig.h
still though, so keep that for now.  To be fixed in a followup CL.

[mtklein mucking around]
Only public API removed.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1360653004
2015-09-22 06:10:35 -07:00
mtklein
b758bbd84e Revert of Combined approach. (patchset #2 id:20001 of https://codereview.chromium.org/1356133002/ )
Reason for revert:
whee

Original issue's description:
> Combined approach.
>
> This combines some ideas from these two CLs:
>     - try stosd/w
>     - update memset16/32 inlining heuristics
>
>
> BUG=skia:4316
>
> Blinking in and out for perf.skia.org.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/46243a7c02a1d5116e55a27ff59218f9c320df97

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

Review URL: https://codereview.chromium.org/1353703006
2015-09-21 11:02:39 -07:00
mtklein
46243a7c02 Combined approach.
This combines some ideas from these two CLs:
    - try stosd/w
    - update memset16/32 inlining heuristics

BUG=skia:4316

Blinking in and out for perf.skia.org.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1356133002
2015-09-21 10:50:56 -07:00
halcanary
0fc1dbe592 SK_API for include/gpu/gl/GrGLInterface.h
Review URL: https://codereview.chromium.org/1357823003
2015-09-21 08:22:19 -07:00
mtklein
b1cc9daa65 Revert of try simplest code: inline whenever vaguely sensible (patchset #1 id:1 of https://codereview.chromium.org/1351403005/ )
Reason for revert:
pingpong

Original issue's description:
> try simplest code: inline whenever vaguely sensible
>
> BUG=skia:4316
>
> Will land and revert.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/527a0c8235b454f5d0475a9a3e34caa9520db3a2

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

Review URL: https://codereview.chromium.org/1355073002
2015-09-20 19:05:01 -07:00
mtklein
527a0c8235 try simplest code: inline whenever vaguely sensible
BUG=skia:4316

Will land and revert.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1351403005
2015-09-20 19:04:21 -07:00
mtklein
c566fddd37 Revert of try stosd/w (patchset #2 id:20001 of https://codereview.chromium.org/1355063002/ )
Reason for revert:
boink

Original issue's description:
> try stosd/w
>
> While we're trying things and reverting them, might as well try this too.
>
> BUG=skia:4316
>
> Blinking in and out for perf.skia.org.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/3ca0f626a07e9b534d14a2d8213eedb93c5f7534

TBR=mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4316

Review URL: https://codereview.chromium.org/1356983004
2015-09-20 18:06:03 -07:00
mtklein
3ca0f626a0 try stosd/w
While we're trying things and reverting them, might as well try this too.

BUG=skia:4316

Blinking in and out for perf.skia.org.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1355063002
2015-09-20 18:05:23 -07:00
mtklein
b63d816683 Revert of update memset16/32 inlining heuristics (patchset #1 id:1 of https://codereview.chromium.org/1357193002/ )
Reason for revert:
Who wants to land forever?

Original issue's description:
> update memset16/32 inlining heuristics
>
> I spent some time looking at perf.skia.org and it looks like we can do better.
>
> It is weird, weird, weird that on x86, we see three completely different behaviors:
>   - x86 Android: inlining better for small N, custom better for large N;
>   - Windows:     inlining better for large N, custom better for small N;
>   - other x86:   inlining generally better
>
> BUG=skia:4316,chromium:516426
>
> (Temporary, plan to revert.)
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/b68fa409fc00ce2f38e2a0fd6f9dc2379b372481

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

Review URL: https://codereview.chromium.org/1358793002
2015-09-20 15:02:54 -07:00
mtklein
b68fa409fc update memset16/32 inlining heuristics
I spent some time looking at perf.skia.org and it looks like we can do better.

It is weird, weird, weird that on x86, we see three completely different behaviors:
  - x86 Android: inlining better for small N, custom better for large N;
  - Windows:     inlining better for large N, custom better for small N;
  - other x86:   inlining generally better

BUG=skia:4316,chromium:516426

(Temporary, plan to revert.)
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1357193002
2015-09-20 15:02:15 -07:00
herb
966e3d30ba Add debug mode to shared mutex.
Review URL: https://codereview.chromium.org/1307863009
2015-09-18 07:00:48 -07:00
reed
4b3d3bebda use allocator (if present) when we allocate our cache bitmap
Remove some bogus tests on the cache, as they are not thread-reliable. Running w/ discardable these are racy.

BUG=532981

Review URL: https://codereview.chromium.org/1351453004
2015-09-17 13:35:19 -07:00
reed
3322a8137d share code between SkGr and Cacherator
BUG=skia:

Review URL: https://codereview.chromium.org/1351533004
2015-09-16 10:09:24 -07:00
herb
3667d5bf3f Add subtract to atomics.
BUG=skia:

Review URL: https://codereview.chromium.org/1348113004
2015-09-16 07:46:17 -07:00
bsalomon
ae4738f677 Create fragment processor for performing input color blend with child processor
The new FP is used to implement SkXM::Mode color filters and SkXM::Mode image filters. Also, these now support all advanced SkXM::Mode xfermodes.

Review URL: https://codereview.chromium.org/1334293003
2015-09-15 15:33:27 -07:00
herb
cd7f035974 Revert of Parallel cache - preliminary (patchset #24 id:460001 of https://codereview.chromium.org/1264103003/ )
Reason for revert:
Breaks DrMemory in the chrome roll.

Original issue's description:
> Parallel cache.
>
> TBR=reed@google.com
>
> BUG=skia:1330,528560
>
> Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f
>
> Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec
>
> Committed: https://skia.googlesource.com/skia/+/014ffdb01ea5317614a1569efc30c50f06434222

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

Review URL: https://codereview.chromium.org/1345903002
2015-09-15 15:15:41 -07:00
ericrk
0a5fa484fd Add onMemoryDump to GrContext
Adds an entry point to GrContext to allow enumeration and tracing of GPU resources
via the newly added SkTraceMemoryDump.

Plan is for Chrome to call this on each of its GrContexts.

Dumps both the total size of GPU resources, as well as the total purgeable size.

BUG=526261

Review URL: https://codereview.chromium.org/1313743002
2015-09-15 14:16:10 -07:00
reed
7a4d847558 use SkBitmapProvider for shader-context
BUG=skia:

Review URL: https://codereview.chromium.org/1343123005
2015-09-15 13:33:58 -07:00
halcanary
435657fd62 Forward declare SkStrokeRec in SkPathEffect
Review URL: https://codereview.chromium.org/1312163008
2015-09-15 12:53:07 -07:00
robertphillips
30c4cae7d3 Add special case circle blur for Ganesh
This makes the blurcircles bench go from ~33us to ~8us on Windows desktop.

It will require layout test suppressions

Review URL: https://codereview.chromium.org/1311583005
2015-09-15 10:20:55 -07:00
egdaniel
723b0501e2 Add support for blending of LCD for all blend modes.
BUG=skia:

Review URL: https://codereview.chromium.org/1313623002
2015-09-15 09:31:40 -07:00
herb
014ffdb01e Parallel cache.
TBR=reed@google.com

BUG=skia:1330,528560

Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f

Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec

Review URL: https://codereview.chromium.org/1264103003
2015-09-15 07:03:03 -07:00
fmalita
cd56f812e0 SkImageSource
Blink is migrating away from SkBitmaps, so we need an SkImage-based
SkImageFilter source.  This is pretty much a 1-1 equivalent of
SkBitmapSource.

To avoid duplication, relocate the SkImage deserialization logic
from SkPictureData to SkReadBuffer.

R=reed@google.com,robertphillips@google.com,senorblanco@chromium.org

Review URL: https://codereview.chromium.org/1343703005
2015-09-14 13:31:18 -07:00
bsalomon
506c802a3d Add helper for creating leaf FPs inside GrFP::TestCreate functions
Review URL: https://codereview.chromium.org/1334273003
2015-09-14 13:16:26 -07:00
egdaniel
ec00d94199 Move some of the adding stencil attachment logic of Gpu and into Render Target.
The new flow of calls for attaching a Stencil looks like:

Client
  rt->attachStencilAttachment()
    gpu->getStencilAttachment()
      glgpu->createStencilAttachment()
    glrt->completeStencilAttachment() //actually attaches

BUG=skia:

Review URL: https://codereview.chromium.org/1333383002
2015-09-14 12:56:10 -07:00
bsalomon
b5b603241a Test that GrFragmentProcessors work without input colors.
Committed: https://skia.googlesource.com/skia/+/72c58e7052af2a0855412ce4b249f977069db751

Review URL: https://codereview.chromium.org/1341853002
2015-09-14 12:26:34 -07:00
bsalomon
59ce45fe79 Revert of Test that GrFragmentProcessors work without input colors. (patchset #2 id:20001 of https://codereview.chromium.org/1341853002/ )
Reason for revert:
Need to fix up more processor subclasses.

Original issue's description:
> Test that GrFragmentProcessors work without input colors.
>
> Committed: https://skia.googlesource.com/skia/+/72c58e7052af2a0855412ce4b249f977069db751

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

Review URL: https://codereview.chromium.org/1338403003
2015-09-14 12:01:42 -07:00
bsalomon
72c58e7052 Test that GrFragmentProcessors work without input colors.
Review URL: https://codereview.chromium.org/1341853002
2015-09-14 11:55:52 -07:00
reed
4d5b67637b formalize generate->bitmap
just move block of code to expose it

BUG=skia:4328
TBR=

Review URL: https://codereview.chromium.org/1334033004
2015-09-13 11:03:32 -07:00
hendrikw
eddbefb4a5 skia: Add ANGLE with GL backend to nanobench/DM
This will allow us to test this without hacking it in, might be useful
for others too.

Review URL: https://codereview.chromium.org/1338003002
2015-09-11 13:07:29 -07:00
jyasskin
951d854327 Revert of Parallel cache - preliminary (patchset #23 id:440001 of https://codereview.chromium.org/1264103003/ )
Also reverts https://codereview.chromium.org/1333003002/ which was layered on top.

Reason for revert:
Appears to leak GDI handles: http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Unit%20%28DrMemory%20full%29%20%282%29/builds/8247

~~Dr.M~~ Error #1: HANDLE LEAK: GDI handle 0x03050a84 and 3 similar handle(s) were opened but not closed:
~~Dr.M~~ # 0 system call NtGdiCreateDIBSection
~~Dr.M~~ # 1 GDI32.dll!CreateDIBSection                                                +0xdc     (0x768ead23 <GDI32.dll+0x1ad23>)
~~Dr.M~~ # 2 skia.dll!HDCOffscreen::draw                                                [third_party\skia\src\ports\skfonthost_win.cpp:499]
~~Dr.M~~ # 3 skia.dll!SkScalerContext_GDI::generateImage                                [third_party\skia\src\ports\skfonthost_win.cpp:1233]
~~Dr.M~~ # 4 skia.dll!SkScalerContext::getImage                                         [third_party\skia\src\core\skscalercontext.cpp:530]
~~Dr.M~~ # 5 skia.dll!SkGlyphCache::OnceFillInImage                                     [third_party\skia\src\core\skglyphcache.cpp:252]
~~Dr.M~~ # 6 skia.dll!sk_once_slow<>                                                    [third_party\skia\include\core\skonce.h:76]
~~Dr.M~~ # 7 skia.dll!SkGlyphCache::findImage                                           [third_party\skia\src\core\skglyphcache.cpp:260]
~~Dr.M~~ # 8 skia.dll!D1G_RectClip                                                      [third_party\skia\src\core\skdraw.cpp:1479]
~~Dr.M~~ # 9 skia.dll!SkDraw::drawPosText                                               [third_party\skia\src\core\skdraw.cpp:1838]
~~Dr.M~~ #10 skia.dll!SkBitmapDevice::drawPosText                                       [third_party\skia\src\core\skbitmapdevice.cpp:348]
~~Dr.M~~ #11 skia.dll!SkCanvas::onDrawPosText                                           [third_party\skia\src\core\skcanvas.cpp:2433]
~~Dr.M~~ #12 skia.dll!SkCanvas::drawPosText                                             [third_party\skia\src\core\skcanvas.cpp:2507]
~~Dr.M~~ #13 skia.dll!SkRecords::Draw::draw<>                                           [third_party\skia\src\core\skrecorddraw.cpp:109]
~~Dr.M~~ #14 skia.dll!SkRecord::Record::visit<>                                         [third_party\skia\src\core\skrecord.h:170]
~~Dr.M~~ #15 skia.dll!SkRecordDraw                                                      [third_party\skia\src\core\skrecorddraw.cpp:55]
~~Dr.M~~ #16 skia.dll!SkBigPicture::playback                                            [third_party\skia\src\core\skbigpicture.cpp:43]
~~Dr.M~~ #17 skia.dll!SkCanvas::onDrawPicture                                           [third_party\skia\src\core\skcanvas.cpp:2800]
~~Dr.M~~ #18 skia.dll!SkCanvas::drawPicture                                             [third_party\skia\src\core\skcanvas.cpp:2770]
~~Dr.M~~ #19 cc.dll!cc::DrawingDisplayItem::Raster                                      [cc\playback\drawing_display_item.cc:51]
~~Dr.M~~ #20 cc.dll!cc::DisplayItemList::Raster                                         [cc\playback\display_item_list.cc:107]
~~Dr.M~~ #21 cc.dll!cc::DisplayListRasterSource::RasterCommon                           [cc\playback\display_list_raster_source.cc:122]
~~Dr.M~~ #22 cc.dll!cc::DisplayListRasterSource::PlaybackToCanvas                       [cc\playback\display_list_raster_source.cc:100]
~~Dr.M~~ #23 cc.dll!cc::TileTaskWorkerPool::PlaybackToMemory                            [cc\raster\tile_task_worker_pool.cc:208]
~~Dr.M~~ #24 cc.dll!cc::OneCopyTileTaskWorkerPool::PlaybackAndCopyOnWorkerThread        [cc\raster\one_copy_tile_task_worker_pool.cc:413]
~~Dr.M~~ #25 cc.dll!cc::`anonymous namespace'::RasterBufferImpl::Playback               [cc\raster\one_copy_tile_task_worker_pool.cc:53]
~~Dr.M~~ #26 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::Raster                   [cc\tiles\tile_manager.cc:131]
~~Dr.M~~ #27 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::RunOnWorkerThread        [cc\tiles\tile_manager.cc:90]
~~Dr.M~~ #28 cc.dll!cc::TaskGraphRunner::RunTaskWithLockAcquired                        [cc\raster\task_graph_runner.cc:418]
~~Dr.M~~ #29 cc.dll!cc::TaskGraphRunner::Run                                            [cc\raster\task_graph_runner.cc:361]
~~Dr.M~~ #30 base.dll!base::SimpleThread::ThreadMain                                    [base\threading\simple_thread.cc:66]
~~Dr.M~~ #31 base.dll!base::`anonymous namespace'::ThreadFunc                           [base\threading\platform_thread_win.cc:82]
~~Dr.M~~ #32 KERNEL32.dll!BaseThreadInitThunk                                          +0x11     (0x7570337a <KERNEL32.dll+0x1337a>)
~~Dr.M~~ Note: @0:15:51.087 in thread 196
~~Dr.M~~ Note: handles created with the same callstack are closed here:
~~Dr.M~~ Note: # 0 system call NtGdiDeleteObjectApp
~~Dr.M~~ Note: # 1 GDI32.dll!DeleteObject                                                    +0x149    (0x768e57d3 <GDI32.dll+0x157d3>)
~~Dr.M~~ Note: # 2 skia.dll!HDCOffscreen::draw                                                [third_party\skia\src\ports\skfonthost_win.cpp:471]
~~Dr.M~~ Note: # 3 skia.dll!SkScalerContext_GDI::generateImage                                [third_party\skia\src\ports\skfonthost_win.cpp:1233]
~~Dr.M~~ Note: # 4 skia.dll!SkScalerContext::getImage                                         [third_party\skia\src\core\skscalercontext.cpp:530]
~~Dr.M~~ Note: # 5 skia.dll!SkGlyphCache::OnceFillInImage                                     [third_party\skia\src\core\skglyphcache.cpp:252]
~~Dr.M~~ Note: # 6 skia.dll!sk_once_slow<>                                                    [third_party\skia\include\core\skonce.h:76]
~~Dr.M~~ Note: # 7 skia.dll!SkGlyphCache::findImage                                           [third_party\skia\src\core\skglyphcache.cpp:260]
~~Dr.M~~ Note: # 8 skia.dll!D1G_RectClip                                                      [third_party\skia\src\core\skdraw.cpp:1479]
~~Dr.M~~ Note: # 9 skia.dll!SkDraw::drawPosText                                               [third_party\skia\src\core\skdraw.cpp:1838]
~~Dr.M~~ Note: #10 skia.dll!SkBitmapDevice::drawPosText                                       [third_party\skia\src\core\skbitmapdevice.cpp:348]
~~Dr.M~~ Note: #11 skia.dll!SkCanvas::onDrawPosText                                           [third_party\skia\src\core\skcanvas.cpp:2433]
~~Dr.M~~ Note: #12 skia.dll!SkCanvas::drawPosText                                             [third_party\skia\src\core\skcanvas.cpp:2507]
~~Dr.M~~ Note: #13 skia.dll!SkRecords::Draw::draw<>                                           [third_party\skia\src\core\skrecorddraw.cpp:109]
~~Dr.M~~ Note: #14 skia.dll!SkRecord::Record::visit<>                                         [third_party\skia\src\core\skrecord.h:170]
~~Dr.M~~ Note: #15 skia.dll!SkRecordDraw                                                      [third_party\skia\src\core\skrecorddraw.cpp:55]
~~Dr.M~~ Note: #16 skia.dll!SkBigPicture::playback                                            [third_party\skia\src\core\skbigpicture.cpp:43]
~~Dr.M~~ Note: #17 skia.dll!SkCanvas::onDrawPicture                                           [third_party\skia\src\core\skcanvas.cpp:2800]
~~Dr.M~~ Note: #18 skia.dll!SkCanvas::drawPicture                                             [third_party\skia\src\core\skcanvas.cpp:2770]
~~Dr.M~~ Note: #19 cc.dll!cc::DrawingDisplayItem::Raster                                      [cc\playback\drawing_display_item.cc:51]
~~Dr.M~~ Note: #20 cc.dll!cc::DisplayItemList::Raster                                         [cc\playback\display_item_list.cc:107]
~~Dr.M~~ Note: #21 cc.dll!cc::DisplayListRasterSource::RasterCommon                           [cc\playback\display_list_raster_source.cc:122]
~~Dr.M~~ Note: #22 cc.dll!cc::DisplayListRasterSource::PlaybackToCanvas                       [cc\playback\display_list_raster_source.cc:100]
~~Dr.M~~ Note: #23 cc.dll!cc::TileTaskWorkerPool::PlaybackToMemory                            [cc\raster\tile_task_worker_pool.cc:208]
~~Dr.M~~ Note: #24 cc.dll!cc::OneCopyTileTaskWorkerPool::PlaybackAndCopyOnWorkerThread        [cc\raster\one_copy_tile_task_worker_pool.cc:413]
~~Dr.M~~ Note: #25 cc.dll!cc::`anonymous namespace'::RasterBufferImpl::Playback               [cc\raster\one_copy_tile_task_worker_pool.cc:53]
~~Dr.M~~ Note: #26 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::Raster                   [cc\tiles\tile_manager.cc:131]
~~Dr.M~~ Note: #27 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::RunOnWorkerThread        [cc\tiles\tile_manager.cc:90]
~~Dr.M~~ Note: #28 cc.dll!cc::TaskGraphRunner::RunTaskWithLockAcquired                        [cc\raster\task_graph_runner.cc:418]
~~Dr.M~~ Note: #29 cc.dll!cc::TaskGraphRunner::Run                                            [cc\raster\task_graph_runner.cc:361]
~~Dr.M~~ Note: #30 base.dll!base::SimpleThread::ThreadMain                                    [base\threading\simple_thread.cc:66]
~~Dr.M~~ Note: #31 base.dll!base::`anonymous namespace'::ThreadFunc                           [base\threading\platform_thread_win.cc:82]
~~Dr.M~~ Note: #32 KERNEL32.dll!BaseThreadInitThunk                                          +0x11     (0x7570337a <KERNEL32.dll+0x1337a>)

Original issue's description:
> Parallel cache.
>
> TBR=reed@google.com
>
> BUG=skia:1330
>
> Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f
>
> Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec

TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org,herb@google.com
BUG=skia:1330

[mtklein mucking around]
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1339493002
2015-09-10 18:11:29 -07:00
reed
85d9178832 Use SkImageCacherator in SkImages
Possible follow-up changes to consider

1. Roll SkImage_Raster and _Gpu into _Generator, where the generator (or cacherator) is backed by a pre-existing texture or raster.
2. Evolve SkImageUsageType into a verb requiring stretching, and have the caller (common code) digest the caps() and usage, so that subclasses are just told what to do (stretch or not)
3. Common code/utility to convert an unstretched texture into a stretch one (and cache it) if the generator can only make an unstretched one.

BUG=skia:

Review URL: https://codereview.chromium.org/1282363002
2015-09-10 14:33:38 -07:00
joshualitt
f238469b05 Late creation of GrPathProcessor
BUG=skia:

Review URL: https://codereview.chromium.org/1337513002
2015-09-10 11:00:51 -07:00
mtklein
4a37d08382 Port SkBlitRow::Color32 to SkOpts.
This was a pre-SkOpts attempt that we can bring under its wing now.

This should be a perf no-op, deo volente.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1314863006
2015-09-10 10:38:02 -07:00
bsalomon
6c6f65885b Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessing the same GrContext to read back GPU input data
BUG=chromium:524717

TBR=reed@google.com

Committed: https://skia.googlesource.com/skia/+/eb662bc407cec0585a821946fef123102cae64db

Review URL: https://codereview.chromium.org/1329313002
2015-09-10 08:12:46 -07:00
bsalomon
32ab260ee1 Revert of Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessin… (patchset #1 id:1 of https://codereview.chromium.org/1329313002/ )
Reason for revert:
breaking the bots

Original issue's description:
> Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessing the same GrContext to read back GPU input data
>
> BUG=chromium:524717
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/eb662bc407cec0585a821946fef123102cae64db

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

Review URL: https://codereview.chromium.org/1334603002
2015-09-09 18:57:49 -07:00
bsalomon
eb662bc407 Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessing the same GrContext to read back GPU input data
BUG=chromium:524717

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1329313002
2015-09-09 18:05:03 -07:00
bsalomon
cb1ccfd205 SK_API on GrWrapTextureInBitmap
BUG=chromium:524717
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1334563002
2015-09-09 14:51:52 -07:00
wangyix
809e5afdd9 Brian requested a new namespace for factories that create fragment processors that combine 2 things with a xfermode. This way, we can change the implementation of these factories in the future to not use GrComposeEffect if desired.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1306163005
2015-09-09 12:58:32 -07:00
herb
bf2988833e Parallel cache.
TBR=reed@google.com

BUG=skia:1330

Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f

Review URL: https://codereview.chromium.org/1264103003
2015-09-09 12:16:10 -07:00
mtklein
9a50174dbc Specialize SkOncePtr<T[]>.
SkOncePtr<T[]> is identical to SkOncePtr<T> except we'll default to delete[]
for cleanup.

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot

BUG=skia:

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

Review URL: https://codereview.chromium.org/1311893010
2015-09-09 10:00:22 -07:00
joshualitt
af2533a165 Make GrProcessorDataManager a noop
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1323963003
2015-09-09 10:00:12 -07:00
bsalomon
1fcc01c415 GrPathRangeBatch
BUG=skia:

Review URL: https://codereview.chromium.org/1315563003
2015-09-09 09:48:06 -07:00
mtklein
6c59d80858 Port uses of SkLazyPtr to SkOncePtr.
This gives SkOncePtr a non-trivial destructor that uses std::default_delete
by default.  This is overrideable, as seen in SkColorTable.

SK_DECLARE_STATIC_ONCE_PTR still just leaves its pointers hanging at EOP.

BUG=skia:

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

Committed: https://skia.googlesource.com/skia/+/a1254acdb344174e761f5061c820559dab64a74c

Review URL: https://codereview.chromium.org/1322933005
2015-09-09 09:09:53 -07:00
mtklein
fe81e2d274 Make SkGraphics::Term a no-op, stop calling it.
I'd remove it entirely but Android is calling it explicitly.

BUG=skia:4259

Committed: https://skia.googlesource.com/skia/+/925979f733fe8e70d84627147dee04d030423349

Review URL: https://codereview.chromium.org/1329853005
2015-09-09 07:35:42 -07:00
mtklein
d9b8d7ac1f Revert of Make SkGraphics::Term a no-op, stop calling it. (patchset #2 id:20001 of https://codereview.chromium.org/1329853005/ )
Reason for revert:
SK_ATTR_DEPRECATED is meaningful to Android.  Don't use it.

Original issue's description:
> Make SkGraphics::Term a no-op, stop calling it.
>
> I'd remove it entirely but Android is calling it explicitly.
>
> BUG=skia:4259
>
> Committed: https://skia.googlesource.com/skia/+/925979f733fe8e70d84627147dee04d030423349

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

Review URL: https://codereview.chromium.org/1314483006
2015-09-09 07:22:09 -07:00
mtklein
2ac6793efc Revert of Port uses of SkLazyPtr to SkOncePtr. (patchset #7 id:110001 of https://codereview.chromium.org/1322933005/ )
Reason for revert:
Breaks Chrome roll.

obj/skia/ext/skia_chrome.skia_memory_dump_provider.o
does not have -I include/private on its include path, but transitively includes SkMessageBus.h.

Original issue's description:
> Port uses of SkLazyPtr to SkOncePtr.
>
> This gives SkOncePtr a non-trivial destructor that uses std::default_delete
> by default.  This is overrideable, as seen in SkColorTable.
>
> SK_DECLARE_STATIC_ONCE_PTR still just leaves its pointers hanging at EOP.
>
> BUG=skia:
>
> No public API changes.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/a1254acdb344174e761f5061c820559dab64a74c

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

Review URL: https://codereview.chromium.org/1334523002
2015-09-09 07:10:42 -07:00
mtklein
a1254acdb3 Port uses of SkLazyPtr to SkOncePtr.
This gives SkOncePtr a non-trivial destructor that uses std::default_delete
by default.  This is overrideable, as seen in SkColorTable.

SK_DECLARE_STATIC_ONCE_PTR still just leaves its pointers hanging at EOP.

BUG=skia:

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

Review URL: https://codereview.chromium.org/1322933005
2015-09-09 06:48:29 -07:00
mtklein
925979f733 Make SkGraphics::Term a no-op, stop calling it.
I'd remove it entirely but Android is calling it explicitly.

BUG=skia:4259

Review URL: https://codereview.chromium.org/1329853005
2015-09-08 15:18:21 -07:00
reed
0f0af23889 Revert[2] of "switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE"
master-skia has been updated to use isABitmap

This reverts commit ff390c9bdd.

BUG=skia:

Review URL: https://codereview.chromium.org/1310573008
2015-09-08 11:02:04 -07:00
reed
43fe6185c5 refactor parts of SkGr.cpp for use by SkImages
BUG=skia:

Review URL: https://codereview.chromium.org/1315353006
2015-09-08 08:37:36 -07:00
halcanary
a5f46e1821 Comments: note existance of SkImage::newShader next to CreateBitmapShader
Review URL: https://codereview.chromium.org/1329083004
2015-09-08 07:12:25 -07:00
scroggo
ff390c9bdd Revert of switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE (patchset #3 id:40001 of https://codereview.chromium.org/1311963007/ )
Reason for revert:
Broke the Android canary:

  https://internal.skia.org/builders/crimson-cherry-474438/builds/124

Original issue's description:
> switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/2d126b5c45e65a67a9945afa9294038a8eb3f2c8

TBR=reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1309943004
2015-09-08 06:24:08 -07:00
bungeman
a3434d83cf Add skstd::unique_ptr and use it.
TBR=bsalomon@google.com
The one gpu include change is just to fix swap in implementation.

Review URL: https://codereview.chromium.org/1330503006
2015-09-07 12:45:52 -07:00
reed
2d126b5c45 switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1311963007
2015-09-07 11:10:30 -07:00
herb
ef2df09997 Revert of Parallel cache - preliminary (patchset #22 id:420001 of https://codereview.chromium.org/1264103003/ )
Reason for revert:
Seems to freeze android devices.

Original issue's description:
> Parallel cache.
>
> TBR=reed@google.com
>
> BUG=skia:1330
>
> Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f

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

Review URL: https://codereview.chromium.org/1327703003
2015-09-04 14:19:45 -07:00
fmalita
c3470340b6 Handle zero-length encoded images gracefully during deserialization
Image encoding may fail during serialization, resulting in zero-length
encoded data in the SKP.

Instead of invalidating the stream (and preventing deserialization of
the whole picture) we can instantiate placeholder images.

BUG=skia:4285
R=reed@google.com,robertphillips@google.com

Review URL: https://codereview.chromium.org/1308273011
2015-09-04 11:36:39 -07:00
herb
6f2a486040 Parallel cache.
TBR=reed@google.com

BUG=skia:1330

Review URL: https://codereview.chromium.org/1264103003
2015-09-04 10:38:58 -07:00
mtklein
714a710c42 SkOncePtr
New abstraction to replace all of: SkOnce, SkLazyPtr, SkLazyFnPtr.

BUG=skia:

Review URL: https://codereview.chromium.org/1301323006
2015-09-04 10:26:27 -07:00
fmalita
2be7125f32 Add a SkPixelSerializer SkImage encode variant
R=reed@google.com
BUG=skia:4285

Review URL: https://codereview.chromium.org/1310633006
2015-09-03 07:17:25 -07:00
jvanverth
5a42c33f27 Add new surface flag
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1320533005
2015-09-02 12:26:10 -07:00
reed
86e90fafe1 add preroll to image, for chrome's warmup pass
BUG=skia:

Review URL: https://codereview.chromium.org/1301373007
2015-09-01 12:22:32 -07:00
halcanary
c9119060a0 Documentation: C API comments
Review URL: https://codereview.chromium.org/1271023002
2015-09-01 10:45:09 -07:00
halcanary
219f18f30d C API: Add SK_API, also documentation of an example.
SK_API = __declspec(dllexport) / __attribute__((visibility("default")))

Also, add documentation in experimental/c-api-example/c.md

Review URL: https://codereview.chromium.org/1307183006
2015-09-01 10:01:38 -07:00
wangyix
73fa61670d Added SkComposeShader GPU implementation
moved onCreateGLInstance() to private in GrComposeEffect

Added SkComposeShader gpu implementation; composeshader gm is unchanged

BUG=skia:4182

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1292353005
2015-09-01 09:45:08 -07:00
joshualitt
dac7005b87 Remove GrGpuTraceMarker hooks until we rethink the design
TBR=bsalomon@google.com
BUG=526308

Review URL: https://codereview.chromium.org/1323823003
2015-09-01 08:19:46 -07:00
bungeman
b2885d59bc Document SkString::resize(int) as destructive.
It is easy to think in some cases that SkString::resize(int) is not
destructive, since optimizations mean that most of the time the data
is still there after a resize. However, in the general case, the
original string's data is lost and the new SkString contains garbage.

Review URL: https://codereview.chromium.org/1304833004
2015-08-31 14:36:48 -07:00
bsalomon
afcd7cd324 Rename flag from "distance field" to "device independent."
Review URL: https://codereview.chromium.org/1322433006
2015-08-31 12:39:41 -07:00
caryclark
5ef194c31a Suppress embedding fonts when the skp's fonts match the OS fonts.
The million SKPs generated require >5T of storage. A good deal
of that are copies of system fonts.

Chrome built with
#DEFINE SK_WHITELIST_SERIALIZED_TYPEFACES
will omit the font data if the font matches a precomputed
checksum.

The captured SKP prepends sk_ to the names of fonts that
have their data omitted. The SKP consumer can either add
renamed fonts from the recording machine, or add

gDeserializeTypefaceDelegate = WhitelistDeserializeTypeface;

which strips the sk_ prefix when deserializing typefaces.

whitelist_typefaces --check
Computes the checksums of fallback
fonts and returns 0 if the checksums match the checked-in
file SkWhitelistChecksum.cpp.

whitelist_typefaces --generate
Writes an updated version of SkWhitelistChecksum.cpp.

(Added Mike since this modifies a public header)

R=bungeman@google.com,rmistry@google.com,reed@google.com

Review URL: https://codereview.chromium.org/1317913005
2015-08-31 09:22:38 -07:00
msarett
5406d6f39a Scanline decoding for bmp
Redesigns SkScanlineDecoder.h to indicate the ordering
in which the scanlines are provided

Refactors SkSwizzler::Fill() to include the zeroInit check
and to actually be correct.

BUG=skia:3257
BUG=skia:4198

Review URL: https://codereview.chromium.org/1287423002
2015-08-31 06:55:13 -07:00
bsalomon
c21b09eec9 Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
Committed: https://skia.googlesource.com/skia/+/ecfdc251be71f3d634e76afdd6375bf55fc061aa

Review URL: https://codereview.chromium.org/1316513002
2015-08-28 18:46:56 -07:00
rmistry
a511e6ad10 Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (patchset #8 id:140001 of https://codereview.chromium.org/1316513002/ )
Reason for revert:
Primary suspect in failing DEPS rolls:
* https://codereview.chromium.org/1315753006
* https://codereview.chromium.org/1308323006
* https://codereview.chromium.org/1320903004

Primary suspect because the failing win bots did not fail in https://codereview.chromium.org/1315753005

Original issue's description:
> Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
>
> Committed: https://skia.googlesource.com/skia/+/ecfdc251be71f3d634e76afdd6375bf55fc061aa

TBR=joshualitt@google.com,wangyix@google.com,robertphillips@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1313573005
2015-08-28 17:16:50 -07:00
bsalomon
ecfdc251be Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
Review URL: https://codereview.chromium.org/1316513002
2015-08-28 14:33:47 -07:00
reed
b236d1a37b change colortable to use factory for reinflating, check for empty
BUG=525763

Review URL: https://codereview.chromium.org/1307023004
2015-08-28 10:14:18 -07:00
bungeman
62ce0303fb Replace SkPin32 with SkTPin and remove.
SkPin32 is already just forwarding to SkTPin, so convert existing
users and remove SkPin32.

Review URL: https://codereview.chromium.org/1314583003
2015-08-28 09:09:32 -07:00
bungeman
7445cef42f Remove sys/types.h include from SkTypes.h.
It appears this was added to support SkToOffT, but SkToOffT
is no longer used, so it is removed as well.

Review URL: https://codereview.chromium.org/1306963004
2015-08-28 07:39:30 -07:00
bungeman
761cf6186e Clean up SkTLogic.
This change regularizes Skia's type traits so that when <type_traits>
can finally be used the transition is easier. Various traits are
renamed to match <type_traits> and placed in the skstd namespace.
Current users of these traits are updated.

Review URL: https://codereview.chromium.org/1317593004
2015-08-28 07:09:20 -07:00
bsalomon
4204800cd8 Convert child FPs from refs to pending executions when parent converts
Review URL: https://codereview.chromium.org/1315923004
2015-08-27 16:43:48 -07:00
mdempsky
38f1f6f9e5 Remove overly complicated GR_CREATE_STATIC_PROCESSOR macro
This macro was responsible for producing code like:

    static SkAlignedStorage<sizeof(Foo)> g_gFoo_Storage;
    static Foo* gFoo = new(g_gFoo_Storage.get()) Foo;
    static SkAutoTDestroy<Foo> gFoo_ad(gFoo);

which would allocate static storage for an object of type Foo
(g_gFoo_Storage), lazily instantiate the object in that memory (via
gFoo's initializer), and then ensure that at global destruction time
the object is destroyed (via gFoo_Ad's destructor).

However, the exact same effect is achieved by just writing:

    static Foo gFoo;

Review URL: https://codereview.chromium.org/1314763009
2015-08-27 12:57:01 -07:00
hendrikw
885bf09255 skia: add ability to load command_buffer_gles2
BUG=skia:

Review URL: https://codereview.chromium.org/1306823003
2015-08-27 10:38:39 -07:00
ssid
33c594c961 [tracing] Add support for skia caches to dump memory stats
Dump the memory statistics of resource cache and glyph cache using the
SkTraceMemoryDump interface.

BUG=chromium:503168

Review URL: https://codereview.chromium.org/1313793004
2015-08-27 09:23:54 -07:00
bsalomon
ac856c97ac Remove GrStagedProcessor, remove the word Stage as it applies to FPs
Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

Review URL: https://codereview.chromium.org/1307223004
2015-08-27 06:30:17 -07:00
halcanary
385fe4d4b6 Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
2015-08-26 13:07:49 -07:00
caryclark
5cb00a9573 zero-length cap fix
Re-land; layout tests are suppressed and gm differences are understood.
A merge conflict prevented a automatic reland.

If the endcap is not butt, draw the endcaps even when the line
has zero length.

If the dash length is zero, generate a zero length line segment.

Treat a move followed by a close as a move followed by a zero-length
line.

TBR=reed@google.com
BUG=422974

Review URL: https://codereview.chromium.org/1314213002
2015-08-26 09:04:55 -07:00
rmistry
4bf69f7bbc Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (patchset #6 id:90001 of https://codereview.chromium.org/1307223004/ )
Reason for revert:
Causes bot failures:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1639

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/1702

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Debug/builds/1223

Original issue's description:
> Remove GrStagedProcessor, remove the word Stage as it applies to FPs
>
> Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

TBR=joshualitt@google.com,egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1306803003
2015-08-26 06:48:27 -07:00
bsalomon
24243446cd Remove GrStagedProcessor, remove the word Stage as it applies to FPs
Review URL: https://codereview.chromium.org/1307223004
2015-08-26 05:39:18 -07:00
bungeman
60e0fee6d4 Remove include of stdlib.h from SkTypes.h.
Unfortunately, immintrin.h (which is also included by SkTypes)
includes xmmintrin.h which includes mm_malloc.h which includes
stdlib.h for malloc even though, from the implementation, it is
difficult to see why.

Fortunately, arm_neon.h does not seem to be involved in such
shenanigans, so building for Android will keep things sane.

TBR=reed@google.com
Doesn't change Skia API, just moves an include.

Review URL: https://codereview.chromium.org/1313203003
2015-08-26 05:15:46 -07:00
bungeman
afd7c74972 Remove SK_OFFSETOF from SkTypes, clean up offsetof usage.
The motivation for this was to remove SK_OFFSETOF from SkTypes, but
this CL is mostly about cleaning up our use of offsetof generally.

SK_OFFSETOF is removed to SkTypes and added to the two places it is
actually used (for the non standard behavior of finding the offset of
fields in types which are not standard layout).

Older versions of gcc required POD for offsetof to be used without
warning. Newer versions require the more relaxed standard layout.
Now that we no longer build on older versions of gcc, remove the
old warning suppressions.

PODMatrix is renamed to AggregateMatrix. SkMatrix is already POD
(trivial and standard layout). The PODMatrix name implies that the
POD-ness is needed for the offsetof, but it is actually the aggregate
attribute which is needed for compile time constant initialization.
This makes it more obvious that this can be revisited after we can
rely on constexpr constructors.

This also adds skstd::declval since this allows removal of existing
awkward code which casts a constant to a pointer to find the size of
a field.

TBR=reed@google.com
No API change, only removes unused macro.

Review URL: https://codereview.chromium.org/1309523003
2015-08-25 12:05:55 -07:00
djsollen
ab5d5de420 Enable debug builds in the Android framework
Review URL: https://codereview.chromium.org/1297093004
2015-08-24 14:21:23 -07:00
mtklein
ab374cf894 Explicitly friend ::SkPrivateEffectInitializer to flattenables.
Looks like the -Wmicrosoft warnings in the bug are coming up specificically
because many the effects in SkLightingImageFilter are defined inside an
anonymous namespace (spanning, I think, lines 33-702 today).

BUG=skia:4091

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

Review URL: https://codereview.chromium.org/1311783004
2015-08-24 12:33:19 -07:00
mtklein
5141d90796 Add build targets for advanced Intel instruction sets (1 of 3).
CL (1 of 3) adds empty lists in our .gypi,
and builds the files in those empty lists with the appropriate flags.

CL (2 of 3) will have Chrome's GYP and GN files read these lists,
and build them with the appropriate flags.

CL (3 of 3) will add runtime detection and stub files to the lists
with empty Init_sse42(), Init_avx(), Init_avx2() methods.

After that, we should be able to use SSE 4.2, AVX, and AVX2 if desired.

Some motivation:
  - SSE 4.2 adds some sweet string-oriented methods that
    can help us write fast high quality 32-bit hashes.
  - AVX is SSE doubled, e.g. 8 floats or two SkPMFloat at a time.
  - AVX2 is SSE2 doubled, e.g. 8 pixels at a time.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1290423007
2015-08-24 10:32:02 -07:00
caryclark
21b998b181 Revert of experiment with zero-length round capped line segments (patchset #4 id:60001 of https://codereview.chromium.org/1309753002/ )
Reason for revert:
More GMs changed than I expected. Will probably affect layout tests as well; reverting until I can verify that the changes are correct.

Original issue's description:
> experiment with zero-length round capped line segments
>
> If the endcap is not butt, draw the endcaps even when the line
> has zero length.
>
> If the dash length is zero, generate a zero length line segment.
>
> Treat a move followed by a close as a move followed by a zero-length
> line.
>
> R=reed@google.com,schenney@google.com
> BUG=422974
>
> Committed: https://skia.googlesource.com/skia/+/dd3c165828fffb369d0f4b13b48381169a0249a9

TBR=reed@google.com,schenney@google.com,schenney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=422974

Review URL: https://codereview.chromium.org/1304163008
2015-08-21 13:47:06 -07:00
caryclark
dd3c165828 experiment with zero-length round capped line segments
If the endcap is not butt, draw the endcaps even when the line
has zero length.

If the dash length is zero, generate a zero length line segment.

Treat a move followed by a close as a move followed by a zero-length
line.

R=reed@google.com,schenney@google.com
BUG=422974

Review URL: https://codereview.chromium.org/1309753002
2015-08-21 13:27:37 -07:00
joshualitt
b6b513b805 Create separate entry points for the various flavors of drawRect
BUG=skia:

Review URL: https://codereview.chromium.org/1308503002
2015-08-21 10:25:18 -07:00
senorblanco
0abdf766d3 Reland of Implement canComputeFastBounds() for image filters. (patchset #1 id:1 of https://codereview.chromium.org/1300403003/ )
Reason for revert:
The Mac compile issue was fixed here: fdd331a42a

Original issue's description:
> Revert of Implement canComputeFastBounds() for image filters. (patchset #8 id:130001 of https://codereview.chromium.org/1296943002/ )
>
> Reason for revert:
> This causes a syntax error.
>
> http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio
>
> Original issue's description:
> > Implement canComputeFastBounds() for image filters.
> >
> > Image filters have never implemented this check, which means that
> > filters which affect transparent black falsely claim they can compute
> > their bounds.
> >
> > Implemented an affectsTransparentBlack() virtual for image
> > filters, and a similar helper function for color filters.
> >
> > This will affect the following GMs: imagefiltersscaled
> > (lighting, perlin noise now filter to clip),
> > colorfilterimagefilter (new test case), imagefiltersclipped
> > (perlin noise now filters to clip).
> >
> > Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
> > a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
> > no impact from this change, but will watch the perf bots carefully.
> >
> > BUG=4212
> >
> > Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb
>
> TBR=reed@google.com,senorblanco@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=4212
>
> Committed: https://skia.googlesource.com/skia/+/12d8472d31ea5edb636d7d5214db253570115c40

TBR=reed@google.com,herb@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=4212

Review URL: https://codereview.chromium.org/1301823005
2015-08-20 11:10:41 -07:00
robertphillips
63926683c5 Add ANGLE workaround to prefer flushes over VRAM usage
On the whole, https://codereview.chromium.org/1286203002/ (Defer flushes if kPreferNoIO is specified) improved performance but it did cause a performance regression on ANGLE. This CL disables the deferral of flushes on ANGLE until we can add a separate incremental flushing mechanism.

TBR=bsalomon@google.com

BUG=skia:4201
BUG=521529

Review URL: https://codereview.chromium.org/1287193008
2015-08-20 09:39:02 -07:00
herb
12d8472d31 Revert of Implement canComputeFastBounds() for image filters. (patchset #8 id:130001 of https://codereview.chromium.org/1296943002/ )
Reason for revert:
This causes a syntax error.

http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio

Original issue's description:
> Implement canComputeFastBounds() for image filters.
>
> Image filters have never implemented this check, which means that
> filters which affect transparent black falsely claim they can compute
> their bounds.
>
> Implemented an affectsTransparentBlack() virtual for image
> filters, and a similar helper function for color filters.
>
> This will affect the following GMs: imagefiltersscaled
> (lighting, perlin noise now filter to clip),
> colorfilterimagefilter (new test case), imagefiltersclipped
> (perlin noise now filters to clip).
>
> Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
> a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
> no impact from this change, but will watch the perf bots carefully.
>
> BUG=4212
>
> Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb

TBR=reed@google.com,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=4212

Review URL: https://codereview.chromium.org/1300403003
2015-08-20 09:28:45 -07:00
fmalita
ddbbddabef SkImage method for detecting lazy decoding
BUG=skia:4224
R=reed@google.com

Review URL: https://codereview.chromium.org/1305453007
2015-08-20 08:47:26 -07:00
primiano
9a5bd7e860 Introduce interface for memory dumps
BUG=chromium:503168

Review URL: https://codereview.chromium.org/1300103004
2015-08-20 08:00:32 -07:00
bungeman
99fe822606 Use static_assert instead of SK_COMPILE_ASSERT.
Now that static_assert is allowed, there is no need to use a non-
standard compile time assertion

Review URL: https://codereview.chromium.org/1306443004
2015-08-20 07:57:52 -07:00
senorblanco
915881fe74 Implement canComputeFastBounds() for image filters.
Image filters have never implemented this check, which means that
filters which affect transparent black falsely claim they can compute
their bounds.

Implemented an affectsTransparentBlack() virtual for image
filters, and a similar helper function for color filters.

This will affect the following GMs: imagefiltersscaled
(lighting, perlin noise now filter to clip),
colorfilterimagefilter (new test case), imagefiltersclipped
(perlin noise now filters to clip).

Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
no impact from this change, but will watch the perf bots carefully.

BUG=4212

Review URL: https://codereview.chromium.org/1296943002
2015-08-20 07:42:11 -07:00
robertphillips
2f0dbc761a Update SkLightingShader to support rotation
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Committed: https://skia.googlesource.com/skia/+/45b59ed6e4e231814dbdb9f707b3d2a7ee50de84

Review URL: https://codereview.chromium.org/1291783003
2015-08-20 05:15:07 -07:00
mtklein
d1c6b7c500 SkColorCubeFilter: require alpha == 0xFF.
This is about a 12% improvement on my desktop, from 134 to 118ms on our bench.

BUG=skia:

Review URL: https://codereview.chromium.org/1295873004
2015-08-19 18:56:50 -07:00
robertphillips
f7d602a458 Revert "Update SkLightingShader to support rotation"
This reverts commit 45b59ed6e4.

TBR=herb@google.com

Review URL: https://codereview.chromium.org/1304673002
2015-08-19 13:11:23 -07:00
reed
216b643fc7 private iterator to visit all resource cache entries
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1271033002
2015-08-19 12:25:41 -07:00
bungeman
f3c15b7cfc Move SkTemplates.h to private.
SkTemplates.h contains a number of Skia specific utilities which are
not designed for external use. In addition to reducing the external
support burden, this will allow Skia to freely refactor this file.

Review URL: https://codereview.chromium.org/1272293004
2015-08-19 11:56:48 -07:00
reed
f5822825ec change asABitmap to isABitmap on shader
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1287263005
2015-08-19 11:46:38 -07:00
mtklein
790d74f7c1 No need to re-declare pure virtual name().
Fixes inconsistent override warning.

BUG=skia:
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1293413003
2015-08-19 11:05:39 -07:00
robertphillips
45b59ed6e4 Update SkLightingShader to support rotation
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Review URL: https://codereview.chromium.org/1291783003
2015-08-19 10:35:14 -07:00
caryclark
95b96d6495 Revert of cast SK_ARRAY_COUNT to make it sign agnostic (patchset #1 id:1 of https://codereview.chromium.org/1299943002/ )
Reason for revert:
fails on chrome build on windows

Original issue's description:
> cast SK_ARRAY_COUNT to make it sign agnostic
>
> By adding a cast to SK_ARRAY_COUNT, the compiler treats the
> compile-time value as if it were a const int, and like regular
> numbers, permits it to be compared to signed and unsigned
> numbers freely.
>
> R=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/bca86202a48b2afa527b6e40d8b360ce3bc7c2e7

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

Review URL: https://codereview.chromium.org/1285263007
2015-08-19 10:12:59 -07:00
caryclark
bca86202a4 cast SK_ARRAY_COUNT to make it sign agnostic
By adding a cast to SK_ARRAY_COUNT, the compiler treats the
compile-time value as if it were a const int, and like regular
numbers, permits it to be compared to signed and unsigned
numbers freely.

R=reed@google.com

Review URL: https://codereview.chromium.org/1299943002
2015-08-19 08:28:14 -07:00
bsalomon
7dea7b7df1 Use calloc to allocate data that will be uploaded to vertex/index buffers in Chrome
BUG=chromium:454267
BUG=chromium:522315

Review URL: https://codereview.chromium.org/1300123002
2015-08-19 08:26:51 -07:00
wangyix
93ab254b7e This change is in preparation for updating how processor keys and meta keys are generated for frag procs.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1298233002
2015-08-19 08:23:12 -07:00
reed
451af5062e remove SkDeferredCanvas
Waiting a day or so to see if the blink-removal of SkDeferredCanvas sticks

BUG=skia:

Review URL: https://codereview.chromium.org/1269093002
2015-08-19 08:18:04 -07:00
joshualitt
da04e0e80a Allow setting of GrBatchFontCache atlas sizes
BUG=skia:

Review URL: https://codereview.chromium.org/1255943006
2015-08-19 08:16:43 -07:00
msarett
b32758a72f Test scaling for small images
We don't want to test small images on Gold because they are
not interested to look at.  Instead, I wrote a unit test to
verify that scaling small images does not cause crashes.

BUG=skia:

Review URL: https://codereview.chromium.org/1287863004
2015-08-18 13:22:46 -07:00
wangyix
b1daa86732 When getGLInstance is called on a frag proc, the resulting GrGLFragmentProcessor will be the root of a tree of GrGLFragmentProcessors that mirrors the GrFragmentProcessor's tree. This allows setData() to be called recursively (removing the responsibility from compose shader) and allows gl instances direct access to their children gl instances so they can emit their code.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1287023009
2015-08-18 11:29:32 -07:00
reed
935d6cfaa7 Add subsets to SkImageGenerator and SkImageCacherator
... to support subsets in SkImage!

BUG=skia:

Review URL: https://codereview.chromium.org/1301633002
2015-08-18 11:16:09 -07:00
mtklein
0c263fa9f8 Deduplicate typefaces across sub-pictures
Old flow to serialize a picture:
   1) serialize picture ops
   2) serialize all sub pictures recursively
   3) flatten the rest of this picture into a buffer, deduping flattenable factories and typefaces as we go
   4) serialize the factories and typefaces
   5) serialize the bytes from 3)

This allows the data in step 5) to refer to the deduplicated factories and typefaces from step 4).  But, each sub picture in step 2) is completely siloed, so they can't dedup with the parent picture or each other.

New flow:
   1) serialize picture ops
   2) flatten the rest of this picture into a buffer, deduping flattenable factories and typefaces as we go
   3) dummy-serialize sub pictures into /dev/null, with the effect of adding any new typefaces to our dedup set
   4) serialize the factories and typefaces
   5) serialize the bytes from 2)
   6) serialize all sub pictures recursively, with perfect deduplication because of step 3).

Now all typefaces in the top-level picture and all sub pictures recursively should end up deduplicated in the top-level typeface set.

Decoding changes are similar: we just thread through the top-level typefaces to the sub pictures.  What's convenient / surprising is that this new code correctly reads old pictures if we just have each picture prefer its local typeface set over the top-level one: old pictures always just use their own typefaces, and new pictures always use the top-level ones.

BUG=skia:4092

Review URL: https://codereview.chromium.org/1233953004
2015-08-18 08:29:59 -07:00
wangyix
54017d7e5b Made isEqual in GrFragmentProcessor recursive
Added comment about how computeInvariantOutput() is non-recursive in GrFragmentProcessor

Made isEqual() recursive in GrFragmentProcessor

BUG=skia:4182

Review URL: https://codereview.chromium.org/1287343005
2015-08-18 07:39:33 -07:00
wangyix
69ed114d38 Added class AutoFragmentChildProcAdvance to be constructed before a child emitCode and destructed after
Fixed wrong indent

Changed auto child advance back to backwards linear search for getting subset of coords and samplers array of a child

Used offset from parent instead of backwards linear search to find a child proc's coords and transforms in Auto...Advance

append mangleString to variable name in nameVariable()

BUILDS! Added AutoFragmentChildProcAdvance class; fixed a few errors from previous commits

BUG=skia:4182

Review URL: https://codereview.chromium.org/1286293002
2015-08-18 07:24:29 -07:00
reed
95dd17737d Revert[8] "move some public headers into private"
This reverts commit fb28cd2b13.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1298833002
2015-08-17 18:29:48 -07:00
fmalita
f433bb2beb SkPaintFilterCanvas should inherit the target canvas state
Currently, SkPaintFilterCanvas does not provide any help in cloning
target canvas state.  While that could be handled in subclasses, it is
easy to miss (see linked bug).

This CL adds a new constructor variant which ensures that the initial
matrix and clip bounds are inherited from the target canvas.

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

Review URL: https://codereview.chromium.org/1294013002
2015-08-17 08:05:13 -07:00
reed
fb28cd2b13 Revert[7] "move some public headers into private"
This reverts commit e02716908f.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1300523002
2015-08-15 08:46:27 -07:00
reed
e02716908f Revert[6] "move some public headers into private"
This reverts commit cc1229c9d5.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1295003002
2015-08-15 07:28:34 -07:00
emmaleer
8f4ba76742 SkScaledCodec class
This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

Committed: https://skia.googlesource.com/skia/+/b157917507d4f7d2651f0aeb566d31603cc02240

Review URL: https://codereview.chromium.org/1260673002
2015-08-14 07:44:46 -07:00
egdaniel
b0a32cc38f Revert of SkScaledCodec class (patchset #35 id:680001 of https://codereview.chromium.org/1260673002/ )
Reason for revert:
breaking ubuntu bots

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee
>
> Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47
>
> Committed: https://skia.googlesource.com/skia/+/b157917507d4f7d2651f0aeb566d31603cc02240

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com,emmaleer@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1285173003
2015-08-14 06:37:37 -07:00
emmaleer
b157917507 SkScaledCodec class
This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

Review URL: https://codereview.chromium.org/1260673002
2015-08-14 05:46:09 -07:00
reed
8f4fe37b1c some catchup CL revisions
BUG=skia:

Review URL: https://codereview.chromium.org/1295593002
2015-08-13 14:06:46 -07:00
mtklein
7e6d9c0326 Every pixel ref gets its own mutex.
Seems like a memory-saving flourish follow up would be to use SkSpinlock.

BUG=Florin's email.

Review URL: https://codereview.chromium.org/1289623004
2015-08-13 14:02:06 -07:00
emmaleer
c7993d747f Revert of SkScaledCodec class (patchset #34 id:660001 of https://codereview.chromium.org/1260673002/ )
Reason for revert:
Seg-faulting:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Release/builds/1608/steps/dm/logs/stdio

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee
>
> Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1294613002
2015-08-13 13:59:21 -07:00
bsalomon
abd30f54b7 Introduce GrBatch subclasses GrDrawBatch and GrVertexBatch to prepare for non-drawing batches
Review URL: https://codereview.chromium.org/1293583002
2015-08-13 13:34:48 -07:00
reed
8f34372f7e Extend SkImageGenerator to support natively generated GrTextures. As part of this, added uniqueID() to the generator, and made it be in the same namespace is bitmaps, pixelrefs, images.
To do this, create SkImageCacherator, which wraps a generator and provides an
interface to get a cached answer for either the raster or texture output of
the generator.

BUG=skia:

Review URL: https://codereview.chromium.org/1291803002
2015-08-13 13:32:39 -07:00
emmaleer
d518ea7927 SkScaledCodec class
This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

Review URL: https://codereview.chromium.org/1260673002
2015-08-13 13:07:03 -07:00