scroggo
352c2181d1
Change SkCanvasState to use inheritance.
...
The base class, SkCanvasState, now holds the version, width, and
height. These fields will always be a necessary part of the class.
(Also add in some padding.)
The other fields, which may change, have been moved into the
subclass, SkCanvasState_v1. If/when the version changes, it will
correspond to a new subclass.
In SkCanvasStateUtils::CreateFromCanvasState, check the version on
the base class, then do a static_cast to the version corresponding
to SkCanvasState::version.
Remove CANVAS_STATE_VERSION, which is redundant with the version
specified by the subclass.
Use unambiguous type for rowBytes.
Build Android with SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG. This allows us
to run the full suite of CanvasState tests. It is also representative
of what will be used on Android by WebView.
Fix CanvasStateTest where it was broken inside ifdef'ed out code.
Use SkCanvas::getBaseLayerSize() instead of the deprecated
SkCanvas::getDeviceSize().
Update the comments in the header to be more clear. In particular,
an SkCanvasState can only be used to pass an SkCanvas' state to a
future version of Skia (or the same); not an older version.
NOTREECHECKS=true
BUG=b/15693384
R=reed@google.com , mtklein@google.com , djsollen@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/372003002
2014-07-15 12:34:26 -07:00
Mike Klein
3944a1d237
destroyContexts after each bench instead of before
...
BUG=skia:
Review URL: https://codereview.chromium.org/394893002
2014-07-15 13:40:19 -04:00
mtklein
6238688af0
Give windows boring bars and use 'us' for microseconds.
...
NOTREECHECKS=true
BUG=skia:
R=bsalomon@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/393673006
2014-07-15 10:30:31 -07:00
Mike Klein
770787e07f
force another build
...
BUG=skia:
Review URL: https://codereview.chromium.org/397493008
2014-07-15 12:01:06 -04:00
Mike Klein
5a89706771
Force a build for nanobench.
...
BUG=skia:
Review URL: https://codereview.chromium.org/391983002
2014-07-15 11:49:58 -04:00
mtklein
1e319f7342
Add --resetGpuContext to both DM and nanobench.
...
Defaulting to true to be conservative for now.
BUG=skia:
NOTREECHECKS=true
R=mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/398483005
2014-07-15 08:27:06 -07:00
kozyatinskiy
c09e8c2ec9
https://chromiumcodereview.appspot.com/331133004/
...
patch from issue 331133004
2014-07-15 11:11:25 -04:00
Mike Klein
e02fcf902f
Another forced run for Android bots.
...
BUG=skia:
Review URL: https://codereview.chromium.org/388683005
2014-07-15 11:00:26 -04:00
Mike Klein
5c0e190656
force build
...
BUG=skia:
Review URL: https://codereview.chromium.org/391103002
2014-07-15 10:37:53 -04:00
borenet
d3b1b1fd62
Whitespace change to test failures after https://skia.googlesource.com/buildbot/+/0e977d0753ecc81fd4e45e088ebc5bc16f0b4b75 and https://skia.googlesource.com/buildbot/+/0e6fdada778ad14e38b25f8b5827a8b156674045
...
BUG=skia:
R=mtklein@google.com
TBR=mtklein
Author: borenet@google.com
Review URL: https://codereview.chromium.org/397613003
2014-07-15 05:30:47 -07:00
bensong
d183032366
manual bench rebase after f459c85
, adjusted with ed458688e2
...
R=robertphillips@google.com
TBR=robertphillips@google.com
Bypassing trybots:
NOTRY=true
Author: bensong@google.com
Review URL: https://codereview.chromium.org/394673002
2014-07-14 16:36:07 -07:00
dandov
49b3590798
Revert of drawVertices bug on gpu side ( https://codereview.chromium.org/387113002/ )
...
Reason for revert:
compare gms failed on 6 images, I will check them and determine if they need a rebaseline or if the output is incorrect.
Original issue's description:
> Fixed the bug in drawVertices when no colors or texture coordinates are provided by modifying the grprimitive to klines and adjusting the indices.
>
> BUG=skia:2745
>
> Committed: https://skia.googlesource.com/skia/+/612364de87cb2012239c4f6435e8e11760617fdc
R=jvanverth@google.com , bsalomon@google.com , egdaniel@google.com
TBR=bsalomon@google.com , egdaniel@google.com , jvanverth@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2745
Author: dandov@google.com
Review URL: https://codereview.chromium.org/395613002
2014-07-14 14:52:36 -07:00
reed
f59eab2693
patch from issue 383923002
...
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/394603003
2014-07-14 14:39:15 -07:00
dandov
612364de87
Fixed the bug in drawVertices when no colors or texture coordinates are provided by modifying the grprimitive to klines and adjusting the indices.
...
BUG=skia:2745
R=jvanverth@google.com , bsalomon@google.com , egdaniel@google.com
Author: dandov@google.com
Review URL: https://codereview.chromium.org/387113002
2014-07-14 14:26:04 -07:00
halcanary
f459c85457
Fix memory leak introduced in http://crrev.com/387863005
...
NOTRY=true
R=bungeman@google.com , mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/395543002
2014-07-14 12:59:59 -07:00
tfarina
6599258a99
Cleanup: Remove unused/unimplemented SkTextLayout.h.
...
Nobody uses it in Skia, Chromium and Blink. And it does not have any
implementation either.
BUG=None
TEST=make all
R=mtklein@google.com , reed@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/385323002
2014-07-14 12:32:47 -07:00
mtklein
a189ccdb4d
nanobench: add --runOnce.
...
BUG=skia:
R=egdaniel@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/392583005
2014-07-14 12:28:48 -07:00
krajcevski
630598cbb8
Add support for NEON intrinsics to speed up texture compression. We can
...
now convert the time that we would have spent uploading the texture to
compressing it giving a net 50% memory savings for these things.
Committed: https://skia.googlesource.com/skia/+/bc9205be0a1094e312da098348601398c210dc5a
R=robertphillips@google.com , mtklein@google.com , kevin.petit@arm.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/390453002
2014-07-14 12:00:04 -07:00
mtklein
60317d0ffb
nanobench: support --outResultsFile
...
BUG=skia:
R=kelvinly@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/390933002
2014-07-14 11:30:37 -07:00
scroggo
41b8687417
Include SkTypes before using ifdefs.
...
Fixes Android framework build.
When building for the Android framework, we depend on SkUserConfig.h
to define things like SK_SUPPORT_GPU. So we cannot have the first
include inside a guard requring SK_SUPPORT_GPU to be defined. Include
SkTypes first, which will pull in SkUserConfig, define the flag, and
allow us to include GrContextFactory.h.
R=reed@google.com , djsollen@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/394533003
2014-07-14 10:25:01 -07:00
scroggo
24b04fa2ad
Alphabetize defines in generated SkUserConfig.
...
When generating SkUserConfig.h for Android, alphabetize the defines.
This will make one merge much harder to look at, but every following
one much easier.
R=mtklein@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/388693003
2014-07-14 10:22:02 -07:00
senorblanco
837f5321a4
Fix for saveLayer() with filters vs. the BBox Hierarchy.
...
When building acceleration structures for SkPicture, we must transform
the primitive's bounds not only by its own SkPaint, but by the paints of
any saveLayer()s currently active above it.
We do this by pushing the SkPaint onto a stack on
saveLayer(), and popping them on restore(). We also push
a NULL paint in save(), so that the pushes and pops are
balanced.
BUG=skia:2734
R=mtklein@google.com , reed@google.com , robertphillips@google.com
Committed: https://skia.googlesource.com/skia/+/6ca0b6a46cbe9bef3e2b9b9db813ec864efd62de
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/380373003
2014-07-14 10:19:55 -07:00
reed
3b72f79289
remove unused SkPixelRef constructor
...
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/390893002
2014-07-14 10:13:57 -07:00
reed
ed458688e2
remove SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE code
...
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/387313004
2014-07-14 09:21:31 -07:00
halcanary
e322482f4d
Move SkPDFStream back to SkStream to save memory.
...
SkPDFStream stores data as a SkStreamRewindable to minimize
deep duplication and memory overhead.
SkStreamToStreamRewindable function to deal with fact that
SkTypeface returns a SkStream.
BUG=skia:2743
R=djsollen@google.com , mtklein@google.com , bungeman@google.com , reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/387863005
2014-07-14 09:12:12 -07:00
halcanary
9c6878be37
Revert of Enable the SSSE3 compile time check on all platforms. ( https://codereview.chromium.org/391693004/ )
...
Reason for revert:
windows fail
Original issue's description:
> Enable the SSSE3 compile time check on all platforms.
>
> BUG=skia:2746
>
> Committed: https://skia.googlesource.com/skia/+/ee349531446ae2a8336b0903e05d0b2150d2131f
R=mtklein@google.com , djsollen@google.com
TBR=djsollen@google.com , mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2746
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/390063002
2014-07-14 08:32:18 -07:00
senorblanco
c07e2811dd
Revert "Fix for saveLayer() with filters vs. the BBox Hierarchy." and
...
"resizeimagefiler is ok with a BBH now".
This reverts commits 6ca0b6a46c
and 8fa73202ea
.
Apparently causing problems in SKP playback.
R=mtklein@google.com , robertphillips@google.com
TBR=mtklein, robertphillips
BUG=skia:
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/381353005
2014-07-14 08:25:34 -07:00
djsollen
ee34953144
Enable the SSSE3 compile time check on all platforms.
...
BUG=skia:2746
R=mtklein@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/391693004
2014-07-14 07:58:42 -07:00
scroggo
55d316eaba
Remove last SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX.
...
Should have been included in https://codereview.chromium.org/379323002
but it was overlooked. As of that CL, the flag does not do anything.
BUG=skia:1976
R=reed@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/390033002
2014-07-14 07:58:34 -07:00
robertphillips
e8464994bb
Make SkPictureShader and SkPictureImageFilter use const SkPictures
...
R=mtklein@google.com , reed@google.com
TBR=reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/390023002
2014-07-14 07:53:27 -07:00
scroggo
7e4b2b5027
Remove unused kImageIsOpaque_Flag.
...
This flag is never set or read. We now look at the alpha type to
determine opacity.
R=reed@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/385943003
2014-07-14 07:53:18 -07:00
djordje.pesut
6336f7c225
MIPS: added optimization for SkRGB16_Opaque_Blitter::blitMask
...
gaint is ~30%
R=djsollen@google.com
Author: djordje.pesut@imgtec.com
Review URL: https://codereview.chromium.org/357693002
2014-07-14 07:48:11 -07:00
piotaixr
cef04f8188
Deleted SkImage::newShaderClamp: not used, not implemented.
...
Implemented SkImage::newShader.
BUG=skia:2701, 344804
R=junov@chromium.org , reed@chromium.org , bsalomon@chromium.org , reed@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/345463009
2014-07-14 07:48:04 -07:00
Robert Phillips
4fdba1cec4
Reallow default SkPicture constructor for Chromium
...
This is breaking the Chromium build in:
external/chromium_org/android_webview/browser/browser_view_renderer.cc
TBR=reed@google.com
Review URL: https://codereview.chromium.org/392593002
2014-07-14 09:28:15 -04:00
robertphillips
c4f30b1074
Make GrAtlas::removePlot static
...
This CL just calves off a small chunk of (Add atlased layer purging - https://codereview.chromium.org/367073002/ ).
R=jvanverth@google.com
TBR=jvanverth@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/388103002
2014-07-13 10:09:42 -07:00
Robert Phillips
cfaeec446d
Remove Skia's use of the default SkPicture constructor and multi-clone
...
This cannot be landed until (Chrome: Switch to one-at-a-time SkPicture::clone interface - https://codereview.chromium.org/380323002/ ) has landed.
R=mtklein@google.com
TBR=reed@google.com
Review URL: https://codereview.chromium.org/388833003
2014-07-13 12:00:50 -04:00
robertphillips
dd528967fc
Remove SkPicture copy constructor
...
Given where we're heading with SkPicture why would you need to make a copy?
R=reed@google.com , mtklein@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/381133002
2014-07-13 07:55:53 -07:00
reed
b184f7f52b
Add SkBitmap::readPixels() and reimplement copyTo and SkCanvas::readPixels
...
This reverts commit 651eaeadeb
.
TBR=
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/390693002
2014-07-13 04:32:32 -07:00
reed
00adc751e7
don't draw unpremul alpha (yet)
...
without these early exits, we can treat unpremul colors as premul, generating asserts and wacky colors.
TBR=
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/386203002
2014-07-12 21:10:52 -07:00
reed
651eaeadeb
Revert of Add SkBitmap::readPixels() and reimplement copyTo and SkCanvas::readPixels ( https://codereview.chromium.org/388803007/ )
...
Reason for revert:
still failing (randomly?) bench sometimes. need stack dump to diagnose.
Original issue's description:
> Add SkBitmap::readPixels() and reimplement copyTo and SkCanvas::readPixels
> usning it.
>
> Revert "Revert of add readPixels() to SkBitmap (https://codereview.chromium.org/377303002/ )"
>
> This reverts commit d08cb905a7
.
>
> TBR=scroggo@google.com
>
> Committed: https://skia.googlesource.com/skia/+/debba5c3d091159149f8a88ab5dcd44dd72e0dc7
R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/382543005
2014-07-12 13:16:10 -07:00
reed
debba5c3d0
Add SkBitmap::readPixels() and reimplement copyTo and SkCanvas::readPixels
...
usning it.
Revert "Revert of add readPixels() to SkBitmap (https://codereview.chromium.org/377303002/ )"
This reverts commit d08cb905a7
.
R=reed@chromium.org
TBR=scroggo@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/388803007
2014-07-12 12:26:36 -07:00
halcanary
fb747e2c74
Make SkPDFFont::fFontInfo a const pointer.
...
BUG=skia:2742
R=djsollen@google.com , scroggo@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/383063007
2014-07-11 19:45:23 -07:00
jvanverth
733f5f5dbc
Refactor SkGrFontScaler and SkGrFontKey into non-virtual versions.
...
This is a pre-cleanup for another change, but has the side benefit of making
the code simpler in general.
No perf increase, despite removing virtual functions.
R=bsalomon@google.com , egdaniel@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/385263002
2014-07-11 19:45:16 -07:00
caryclark
93de7a27e0
fix ios break
...
R=reed@android.com
TBR=reed
NOTREECHECKS=TRUE
NOTRY=TRUE
BUG=skia:
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/388933003
2014-07-11 13:21:17 -07:00
krajcevski
d41dab43e6
Revert of Add support for NEON intrinsics to speed up texture compression. We can ( https://codereview.chromium.org/390453002/ )
...
Reason for revert:
Breaking chrome.
Original issue's description:
> Add support for NEON intrinsics to speed up texture compression. We can
> now convert the time that we would have spent uploading the texture to
> compressing it giving a net 50% memory savings for these things.
>
> Committed: https://skia.googlesource.com/skia/+/bc9205be0a1094e312da098348601398c210dc5a
R=robertphillips@google.com , mtklein@google.com , kevin.petit@arm.com
TBR=kevin.petit@arm.com , mtklein@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/384053003
2014-07-11 13:15:15 -07:00
scroggo
1b0aa001e8
No need to cache local matrix in picture shader.
...
Now that the local matrix cannot be changed, we no longer need
to keep track of it to regenerate the bitmap shader.
Depends on https://codereview.chromium.org/379323002
R=fmalita@google.com , fmalita@chromium.org
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/387043002
2014-07-11 12:19:02 -07:00
caryclark
936b73424f
ios fixes
...
skia_ios.mm
Get the app's Documents directory and pass use it to set the resource path.
This is a quick hack which will be replaced by a new application that is
a tiny shim around a command line tool.
SkImageEncoder.h
SkForceLinking.cpp
SkImageDecoder_CG.cpp
Add support for FORCE_LINKING so iOS sees the PNG encoder and others.
SkFloatBits.cpp
SkPoint.cpp
Handle denormalized numbers that are floored by the iOS ARM processor.
SkImageDecoder_iOS.mm
Remove empty encoder factory.
SkTouchGesture.cpp
Return early on empty state on touch rather than aborting (crashing)
JpegTest.cpp
Hal via stackoverflow.com says partial jpegs can be gray as well.
skia_test.cpp
Remove crash handler call for now to avoid link failure.
OverwriteLine.h
Remove fancy line overwrite for iOS.
Resources.cpp
Add interface to set resource directory based on runtime query.
BUG=skia:2736 skia:2737 skia:2738
R=reed@google.com , halcanary@google.com , mtklein@google.com , tfarina@chromium.org
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/373383003
2014-07-11 12:14:51 -07:00
krajcevski
bc9205be0a
Add support for NEON intrinsics to speed up texture compression. We can
...
now convert the time that we would have spent uploading the texture to
compressing it giving a net 50% memory savings for these things.
R=robertphillips@google.com , mtklein@google.com , kevin.petit@arm.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/390453002
2014-07-11 12:12:27 -07:00
mtklein
5d9d10e821
nanobench: add a cute bar chart
...
Give this a try? Helpful, or gets in the way?
BUG=skia:
R=krajcevski@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/390483002
2014-07-11 11:57:07 -07:00
scroggo
ef0fd61dc2
Remove SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX.
...
This is no longer needed by Android.
BUG=skia:1976
R=reed@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/379323002
2014-07-11 11:33:52 -07:00