Commit Graph

18369 Commits

Author SHA1 Message Date
reed
e47829b6b1 flag to use const& instead of const* for src-rect
BUG=skia:

Review URL: https://codereview.chromium.org/1272713005
2015-08-06 10:02:53 -07:00
bsalomon
fb1141ae1d Don't pass pipeline to GrBatch::generateGeometry()
R=joshualitt@google.com

Review URL: https://codereview.chromium.org/1275083002
2015-08-06 08:52:49 -07:00
joshualitt
c8da81df6b Another small fix for reordering
BUG=skia:

Review URL: https://codereview.chromium.org/1274763008
2015-08-06 08:39:22 -07:00
mtklein
b6394746ff Port SkTextureCompression opts to SkOpts
Pretty vanilla translation.  I cleaned up who calls whom a little.
Used to be utils -> opts -> utils, now it's just utils -> opts.

I may follow up with a pass over the NEON code for readability
and to clean up dead code.

This turns on NEON A8->R11EAC conversion for ARMv8.
Unit tests which now hit the NEON code still pass.
I can't find any related bench.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1273103002
2015-08-06 08:17:16 -07:00
robertphillips
d0cf9d831f Remove SK_LEGACY_SKPOINT3_CTORS flag
Cannot land before Blink https://codereview.chromium.org/1274673002/ (Remove reliance on legacy Skia SkPoint3 ctors in FELighting.cpp)

Review URL: https://codereview.chromium.org/1269383003
2015-08-06 07:08:31 -07:00
fmalita
e2639089bd SkSurface copy-on-write can yield stale GPU render targets.
Prepare_rt_for_external_access() grabs the render target and then fires
access notifications.

But the notification handlers may trigger copy-on-write, causing the
returned render target to be stale (pointing at the detached snapshot).

We should grab the render target after firing notifications.

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

Review URL: https://codereview.chromium.org/1276713002
2015-08-06 07:04:52 -07:00
senorblanco
ebe06c0560 Minor cleanup: remove GR_TESSELLATING_PATH_RENDERING #ifdef.
Also, new -> SkNEW.

Review URL: https://codereview.chromium.org/1280433002
2015-08-06 06:52:10 -07:00
reed
2dcc759cd2 use kFast_SrcRectConstraint to match drawAtlas semantics
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1272743003
2015-08-06 06:51:52 -07:00
scroggo
ab60c5bd9f Support decoding PNG to 565.
Although we initially discussed not supporting 565, SkCodec needs to
support Android's BitmapFactory and BitmapRegionDecoder, which need to
support 565.

We could instead implement 565 on top of SkCodec, but this would require
more memory and run more slowly.

An open question is whether to support dithering, and how. In order to
support dithering, we need to pass y to RowProc, which I believe means
we will need to pass y to SkSwizzler::swizzle().

I dislike having an option which is typically ignored - SkImageDecoder
allows you to turn on dithering when decoding to any color type, but it
is only meaningful only if the output color type is 565.

We could also make the client implement dithering, which I believe would
mean forcing them to do the conversion to 565 (since we have already
thrown away data when we convered to 565 without dithering).

BUG=skia:3257

Review URL: https://codereview.chromium.org/1277593002
2015-08-06 06:08:18 -07:00
reed
fd3d87cf67 simulate drawatlas
BUG=skia:

Review URL: https://codereview.chromium.org/1279733002
2015-08-06 05:14:11 -07:00
mtklein
1a3976795b Rephrase Windows gyp instructions
The existing instructions seem misleading.

BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1275753002

Review URL: https://codereview.chromium.org/1275753002
2015-08-05 16:18:03 -07:00
joshualitt
4fc6ff22c8 Fix reording across rendertarget switching
BUG=skia:

Review URL: https://codereview.chromium.org/1276633003
2015-08-05 14:36:31 -07:00
mtklein
f62833d9c9 Detect MIPS DSP and DSPR2 programattically.
Procedure:

$ platform_tools/android/toolchains/ndk-r10c-mips-darwin_v14/bin/mipsel-linux-android-gcc -dM -E - < /dev/null | sort > vanilla.mips
$ platform_tools/android/toolchains/ndk-r10c-mips-darwin_v14/bin/mipsel-linux-android-gcc -mdsp -dM -E - < /dev/null | sort > dsp.mips
$ platform_tools/android/toolchains/ndk-r10c-mips-darwin_v14/bin/mipsel-linux-android-gcc -mdspr2 -dM -E - < /dev/null | sort > dspr2.mips

$ diff vanilla.mips dsp.mips
239a240,241
> #define __mips_dsp 1
> #define __mips_dsp_rev 1

$ diff vanilla.mips dspr2.mips
239a240,242
> #define __mips_dsp 1
> #define __mips_dsp_rev 2
> #define __mips_dspr2 1

So, defined(__mips_dsp) -> SK_MIPS_HAS_DSP, defined(__mips_dspr2) -> SK_MIPS_HAS_DSPR2.

BUG=skia:

Review URL: https://codereview.chromium.org/1274873002
2015-08-05 14:17:32 -07:00
brucedawson
7b77ac100e Fix variable shadowing and unreachable code that it caused
Change https://codereview.chromium.org/1261643004 renamed a function
parameter so that some code became unreachable. This renames that
parameter back.

R=bsalomon@google.com
BUG=skia:4169

Review URL: https://codereview.chromium.org/1271353003
2015-08-05 14:05:17 -07:00
msarett
cbb12ca953 Fix ASAN error for wbmp swizzles
BUG=skia:

Review URL: https://codereview.chromium.org/1269413006
2015-08-05 13:59:40 -07:00
bungeman
d3ebb48320 IWYU: 'core' target, files starting A-C.
TBR=reed@google.com
Verbal lgtm, does not change API.

Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69

Review URL: https://codereview.chromium.org/1265033002
2015-08-05 13:57:49 -07:00
senorblanco
59cd36765c Revert of Implement caching of stroked paths in the tessellated path renderer. (patchset #4 id:60001 of https://codereview.chromium.org/1275553002/ )
Reason for revert:
Breaking/asserting in Debug on DM.

Original issue's description:
> Implement caching of stroked paths in the tessellated path renderer.
>
> This requires adding the stroke info to the cache key, and doing the
> stroking and dashing before rendering as triangles.
>
> BUG=skia:3755
>
> Committed: https://skia.googlesource.com/skia/+/29e0d3f267a03546f236023347cdb4595ece2fd1

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

Review URL: https://codereview.chromium.org/1276633002
2015-08-05 13:37:49 -07:00
senorblanco
29e0d3f267 Implement caching of stroked paths in the tessellated path renderer.
This requires adding the stroke info to the cache key, and doing the
stroking and dashing before rendering as triangles.

BUG=skia:3755

Review URL: https://codereview.chromium.org/1275553002
2015-08-05 13:18:03 -07:00
mtklein
94df02344b Update NOPRESUBMIT docs.
"NOPRESUBMIT=true" does not work anymore for me.

BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1271423002

Review URL: https://codereview.chromium.org/1271423002
2015-08-05 13:08:12 -07:00
msarett
99f567e617 Scanline decoding for wbmp
We are also changing the wbmp to use SkSwizzler.  This
will allow us to take advantage of the sampling routines
that are being implemented in SkSwizzler.

The image in this upload came from:
https://commons.wikimedia.org/wiki/File:Android_robot.png

It is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.

BUG=skia:

Review URL: https://codereview.chromium.org/1254483004
2015-08-05 12:58:26 -07:00
oysteine
dfcba473b0 Moved common cross-project functionality out from SkTraceEvent.h into SkTraceEventCommon.h
Traditionally, SkTraceEvent.h was manually kept in sync with base/trace_event/trace_event.h, with project-specific parts intermixed, and tended to drift out of sync a lot (mainly in Blink, less so in Skia).

The SkTraceEventCommon.h now has only the cross-project parts, and can be copy-pasted verbatim between projects (it's an identical copy of base/trace_event/trace_event_common.h), meaning SkTraceEvent.h shouldn't go out of sync as it has before.

BUG=skia:

[mtklein mucking around below here]
NOPRESUBMIT=true
CQ_EXCLUDE_TRYBOTS=client.skia.fyi:skia_presubmit-Trybot

Review URL: https://codereview.chromium.org/1270783002
2015-08-05 12:54:40 -07:00
bungeman
2bd028590d Add skstd::move and skstd::forward.
Since we can't use the c++11 standard library, re-implement the bits
we want to use now.

TBR=reed@google.com
The next CL is try to move SkTemplates into private.

Review URL: https://codereview.chromium.org/1273813002
2015-08-05 12:09:57 -07:00
joshualitt
2fe7923f7e Expose coord transforms from GrPipeline
BUG=skia:

Review URL: https://codereview.chromium.org/1275603002
2015-08-05 12:02:27 -07:00
joshualitt
b2aa7cb90f This CL wires up the backend portion necessary for sending transformed coords via vertex attributes.
BUG=skia:

Review URL: https://codereview.chromium.org/1243583002
2015-08-05 11:05:22 -07:00
bsalomon
0e8296eaa6 Move impl of stroke rect batch from h to cpp
Review URL: https://codereview.chromium.org/1275633003
2015-08-05 10:50:01 -07:00
bsalomon
ee14a622b0 Give strokerectbatch a proper home
Review URL: https://codereview.chromium.org/1274763002
2015-08-05 10:34:05 -07:00
joshualitt
847029043e fix for GrFragmentProcessor isEqual in GrPipeline
BUG=skia:

Review URL: https://codereview.chromium.org/1273693003
2015-08-05 09:30:02 -07:00
robertphillips
d8aa59df63 Remove SHADER_AA_FILL_RECT flag
Review URL: https://codereview.chromium.org/1271243004
2015-08-05 09:07:12 -07:00
mtklein
6c17ca5905 Update yasm .gyp for tweaked ASAN bots.
They're not passing -fsanitize=address anymore, rather
-fsanitize=address,bool,etc,etc,etc...

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/1269383002
2015-08-05 08:58:45 -07:00
mtklein
c0e1af1422 Revert of Intentionally crash DM to make sure all bots are up-to-date. (patchset #1 id:1 of https://codereview.chromium.org/1274693002/ )
Reason for revert:
win x64 looks fixed

Original issue's description:
> Intentionally crash DM to make sure all bots are up-to-date.
>
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3749b9646103f544f17aa926fab050f1e5178b17

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

Review URL: https://codereview.chromium.org/1275543003
2015-08-05 08:40:19 -07:00
Eric Boren
fa1c073b4c Fix make.py: BUILDTYPE
TBR=mtklein
BUG=skia:
NOTRY=true
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1273793003 .
2015-08-05 11:30:28 -04:00
Mike Klein
3749b96461 Intentionally crash DM to make sure all bots are up-to-date.
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1274693002 .
2015-08-05 11:13:59 -04:00
Mike Klein
dd958e72f9 Add tools/ubsan.supp.
Should unbreak TSAN bots.

BUG=skia:

Review URL: https://codereview.chromium.org/1272213003 .
2015-08-05 10:12:33 -04:00
bsalomon
1cd63111d5 init atomic bool in SkImage_Gpu
BUG=chromium:516860

TBR=reed@google.com

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1269243004
2015-08-05 06:58:39 -07:00
joshualitt
9162ea9444 Revert of Break LCD and Bitmap text dependency on hardcoded atlas values (patchset #2 id:20001 of https://codereview.chromium.org/1271873002/ )
Reason for revert:
Breaks S3

Original issue's description:
> Break LCD and Bitmap text dependency on hardcoded atlas values
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/846b022f6b469cfde285372f26e0d5c593d122ac

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

Review URL: https://codereview.chromium.org/1271163003
2015-08-05 06:46:09 -07:00
joshualitt
b356cbc765 Move atlas creation to internal to GrResourceProvider
BUG=skia:

Review URL: https://codereview.chromium.org/1260183006
2015-08-05 06:36:39 -07:00
reed
093b4e8f51 - allow for stepping through a picture with 'n' and 'p'
- save current slide as .skp with 'K'

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1272063002
2015-08-04 18:46:38 -07:00
reed
fb8c1fcab1 Revert of IWYU: 'core' target, files starting A-C. (patchset #5 id:80001 of https://codereview.chromium.org/1265033002/ )
Reason for revert:
revert to unblock DEPS roll

../../chrome/browser/chromeos/display/overscan_calibrator.cc:43:10: error: variable has incomplete type 'SkPath'
  SkPath base_path;

Original issue's description:
> IWYU: 'core' target, files starting A-C.
>
> TBR=reed@google.com
> Verbal lgtm, does not change API.
>
> Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69

TBR=reed@google.com,mtklein@google.com,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1273613002
2015-08-04 18:44:57 -07:00
bungeman
7403d87db8 IWYU: 'core' target, files starting A-C.
TBR=reed@google.com
Verbal lgtm, does not change API.

Review URL: https://codereview.chromium.org/1265033002
2015-08-04 14:56:53 -07:00
borenet
1b99b548cb Whitespace change to test Gerrit ACLs
BUG=skia:
TBR=mtklein

Review URL: https://codereview.chromium.org/1255313004
2015-08-04 14:23:48 -07:00
mtklein
d029ded92d Port morphology to SkOpts.
Nothing too fancy.

Direction enums become enum classes so they don't get all confused.  An
alternative is to create one single Direction enum that both blur and
morphology opts use.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1267343004
2015-08-04 14:09:09 -07:00
halcanary
9f8754f591 Remove experimental/PdfViewer
Motivation: maintaining this code doesn't seem worth the time,
since no one seems to be using it.  If someone wants to use it
in the future, just revert this CL.

Review URL: https://codereview.chromium.org/1266093003
2015-08-04 14:08:44 -07:00
fmalita
1dedc3d2c0 SkPictureImageGenerator
R=reed@google.com

Review URL: https://codereview.chromium.org/1240093004
2015-08-04 13:53:14 -07:00
Mike Klein
8caa5af92c Reorganize to keep similar code together.
This organizes memset16, memset32, and rsqrt the same way as the other code.  No functional change.

BUG=skia:4117
R=djsollen@google.com

Review URL: https://codereview.chromium.org/1264423002 .
2015-08-04 16:48:43 -04:00
Eric Boren
8e47cdb176 whitespace change to test whether I can commit
BUG=skia:

Review URL: https://codereview.chromium.org/1268663005 .
2015-08-04 16:38:38 -04:00
Mike Klein
6c3c4ea6db Remove dead code.
BUG=skia:4117
R=mtklein@google.com

Review URL: https://codereview.chromium.org/1262213005 .
2015-08-04 15:49:09 -04:00
senorblanco
84cd621670 Implement caching of filled paths in the tessellated path renderer.
Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached.

Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold.

In order to invalidate the cache when an SkPath is changed or deleted,
this required implementing genID change notification in SkPath. This is
modelled almost exactly on SkPixelRef::GenIDChangeListener.
However, It does not currently implement the check for unique genIDs,
so notifiers will fire when the first instance of an SkPathRef
using a given genID is destroyed.

Another caveat is that you cannot successfully add a change notifier
to an empty path, since it uses the "canonical" empty path which is
never modified or destroyed. For this reason, we prevent adding
listeners to it.

BUG=skia:4121,skia:4122, 497403
DOCS_PREVIEW= https://skia.org/?cl=1114353004

Committed: https://skia.googlesource.com/skia/+/468dfa72eb6694145487be17876804dfca3b7adb

Review URL: https://codereview.chromium.org/1114353004
2015-08-04 10:01:58 -07:00
joshualitt
846b022f6b Break LCD and Bitmap text dependency on hardcoded atlas values
BUG=skia:

Review URL: https://codereview.chromium.org/1271873002
2015-08-04 09:40:03 -07:00
scroggo
1c005e4a38 Create a scanline decoder without creating a codec
Prior to this CL, if a client wanted to decode scanlines, they had to
create an SkCodec in order to get an SkScanlineDecoder. This introduces
complications if input data is not easily shared between the two
objects.

Instead, add methods to SkScanlineDecoder for creating a new one from
input data, and remove the creation functions from SkCodec.

Update DM and tests.

Review URL: https://codereview.chromium.org/1267583002
2015-08-04 09:24:45 -07:00
joshualitt
ddc726f1de Add cheat sheet to wrangler doc
BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1264313003
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1264313003
2015-08-04 09:24:30 -07:00