Commit Graph

3781 Commits

Author SHA1 Message Date
bsalomon
820dd6c335 Add mock context and use in ResourceCacheTest.
BUG=skia:2889

Review URL: https://codereview.chromium.org/702083003
2014-11-05 12:09:45 -08:00
mtklein
e974c6244c Whitelist intentionally racy TRACE_EVENT reads and writes.
Chrome's tracing framework appears to be intentionally racy on its
quick-reject checks, trading some data loss for better performance
when disabled.  People will never notice the data loss, but TSAN does.
Let's assuage TSAN with some annotations.

The 'volatile' val in SK_ANNOTATE_UNPROTECTED_WRITE was making this
not compile, but that volatile doesn't really make sense there: the value we're
writing is not what we care about, it's the destination.

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot

No API changes.
TBR=reed

BUG=skia:

Review URL: https://codereview.chromium.org/702883002
2014-11-05 08:03:27 -08:00
tfarina
f6e59b5035 Cleanup: Remove unused InstallNewHandler() function from SkGraphics.
BUG=None
TEST=None
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/701813006
2014-11-05 07:20:51 -08:00
robertphillips
9f2251c73e Crop the fast path dashed lines to the cull rect
Without:

maxrss  loops   min     median  mean    max     stddev  samples         config  bench
  56M   1       13.3ms  13.6ms  13.6ms  14.2ms  2%      Ooooo.....      8888    GM_dashing5_bw
  56M   13      390us   417us   416us   459us   5%      ooooO..o.o      gpu     GM_dashing5_bw
  56M   1       13.4ms  13.9ms  14.1ms  15ms    3%      Oooo..ooOo      8888    GM_dashing5_aa
  56M   13      402us   421us   416us   425us   2%      Ooo.ooOOOO      gpu     GM_dashing5_aa

With:

  40M   1       1.53ms  1.54ms  1.54ms  1.55ms  0%      oo.O...o..      8888    GM_dashing5_bw
  40M   12      407us   412us   415us   445us   3%      ...Oo.....      gpu     GM_dashing5_bw
  40M   1       1.7ms   1.7ms   1.7ms   1.72ms  0%      o.O.......      8888    GM_dashing5_aa
  43M   13      405us   409us   409us   415us   1%      ooo.Ooo..o      gpu     GM_dashing5_aa

The GM images (including the new one) are the same with and without this CL.

BUG=428296

Review URL: https://codereview.chromium.org/699623003
2014-11-04 13:33:50 -08:00
piotaixr
2bf8d09689 Revert of Override SkCanvas::drawImage() in SkDeferredCanvas and SkGPipe (patchset #8 id:140001 of https://codereview.chromium.org/613673005/)
Reason for revert:
The patch is breaking the telemetry blink build on some windows configurations

Original issue's description:
> Override SkCanvas::drawImage() in SkDeferredCanvas and SkGPipe
>
> Depend on https://codereview.chromium.org/663233002
>
> BUG=skia:2947
>
> Committed: https://skia.googlesource.com/skia/+/687732fe046c9cfec940f2d7f661cd97651d10a8
>
> Committed: https://skia.googlesource.com/skia/+/9bb7539a59ab15749fe26fecfec05330cffae684

BUG=skia:2947, 426708

Review URL: https://codereview.chromium.org/705633002
2014-11-04 13:21:41 -08:00
jvanverth
f7007b023d Enable distance field path rendering in Chrome.
- Add stat tracking for df-renderable paths
- Modify GPU rasterization veto to account for df-renderable paths
- Remove #define hiding df paths from Chromium and Android

BUG=skia:2935

Review URL: https://codereview.chromium.org/685113003
2014-11-04 07:59:01 -08:00
reed
1b6ab4417e add textblobs to lua
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/688363003
2014-11-03 19:55:41 -08:00
fmalita
7c11aadd82 Export (SK_API) SkSurfaceProps
R=reed@google.com

Review URL: https://codereview.chromium.org/693973003
2014-11-03 17:07:36 -08:00
reed
615c593780 move SkTextBox into utils
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/696293005
2014-11-03 14:55:40 -08:00
qiankun.miao
fb502f072f Optimize SkRect::sort()
This optimization can reduce comparison and assignments. For
geo_rect_sort benchmark, performance improved to 1.63us from 3.28us.

BUG=skia:

Review URL: https://codereview.chromium.org/695443005
2014-11-03 14:34:31 -08:00
bsalomon
87a94eb163 Rename and clarify semantics of GrContext::resolveRenderTarget.
Review URL: https://codereview.chromium.org/696293004
2014-11-03 14:28:32 -08:00
bsalomon
89c62980c1 Don't allow renderTarget==NULL to GrContext::clear() and friends.
Review URL: https://codereview.chromium.org/680413005
2014-11-03 12:08:42 -08:00
egdaniel
37b4d866b1 Force input coverage to be only a byte in gpu shaders.
Prime coverage invariant output calculations with single component

BUG=skia:

Review URL: https://codereview.chromium.org/649783003
2014-11-03 10:07:07 -08:00
bsalomon
37dd331b20 Add class GrGLTextureRenderTarget for GL texture/rendertarget objects
BUG=skia:2889

Review URL: https://codereview.chromium.org/695813003
2014-11-03 08:47:23 -08:00
tfarina
77ae06ba7a Cleanup: Remove unnecessary forward declarations from some views files.
Cautch in
https://skia.googlesource.com/skia/+/a3a706fcd4cc9376a1223a53f57589f29d4a36ea

BUG=None
TEST=None
R=djsollen@google.com

Review URL: https://codereview.chromium.org/680253004
2014-11-03 08:31:23 -08:00
joshualitt
5c55fef032 GrContext no longer ever draws on Gpu
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/7a75e5230872732e71ea99058d9afe5d4b6758b0

Review URL: https://codereview.chromium.org/683733005
2014-10-31 14:04:35 -07:00
joshualitt
b9e8230b50 Revert of GrContext no longer ever draws on Gpu (patchset #7 id:120001 of https://codereview.chromium.org/683733005/)
Reason for revert:
breaks some android bots

Original issue's description:
> GrContext no longer ever draws on Gpu
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7a75e5230872732e71ea99058d9afe5d4b6758b0

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

Review URL: https://codereview.chromium.org/694983002
2014-10-31 12:20:08 -07:00
joshualitt
7a75e52308 GrContext no longer ever draws on Gpu
BUG=skia:

Review URL: https://codereview.chromium.org/683733005
2014-10-31 11:34:53 -07:00
stephana
0b5fc9774f Quick and dirty test to call the C interface from GO.
BUG=skia:

Review URL: https://codereview.chromium.org/670303005
2014-10-31 07:11:19 -07:00
tfarina
38406c82b9 Cleanup: Go with SkDebugf instead of GrPrintf.
Since GrPrintf is just defined to SkDebugf, we can go with the later
directly.

BUG=None
TEST=None
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/695663003
2014-10-31 07:11:12 -07:00
tfarina
58f467c210 Cleanup: Remove GR_ARRAY_COUNT macro.
It is defined to SK_ARRAY_COUNT, and there are no uses of it.

Lets just use the SK_ variant.

BUG=None
TEST=None
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/691133003
2014-10-31 07:06:01 -07:00
reed
bd1605905b begin clean up for scalar is double option
BUG=skia:

Review URL: https://codereview.chromium.org/694693002
2014-10-31 06:55:41 -07:00
robertphillips
d8aa7b74c8 Upgrade GPUOptimize
This will be a bit hairy to review.

The FillBounds and CollectLayers code has diverged significantly resulting in the rendering path seeing different bounds than the hoisting path. This CL merges the FillBounds changes into CollectLayers. A follow on CL will, hopefully, find a way to layer CollectLayers on top of FillBounds.

The only code in CollectLayers that is different from FillBounds is bracketed by "LAYER HOISTING" comments.

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/685263004
2014-10-30 16:45:02 -07:00
djsollen
a3a706fcd4 Cleanup android to ensure it can compile with clang
Review URL: https://codereview.chromium.org/694533002
2014-10-30 11:39:13 -07:00
halcanary
902d4d18de Add SkDocument::getStream() method.
Motivation: SkDocument_PDF can be refactored to stream all
PDF objects as SkCanvas calls are made, to save memory!

BUG=skia:3030
BUG=skia:2683

Review URL: https://codereview.chromium.org/691783002
2014-10-30 11:29:00 -07:00
mtklein
e71cd54ed4 SkTaskGroup::batch(fn, args, N)
Porting QuiltTask isn't important in itself; this is mostly an API feeler.

BUG=skia:

Review URL: https://codereview.chromium.org/689673003
2014-10-29 14:17:13 -07:00
reed
89889b6939 MultiPictureDraw is taskgroup aware.
SampleApp is multipicturedraw aware.

BUG=skia:

Review URL: https://codereview.chromium.org/684923002
2014-10-29 12:36:45 -07:00
senorblanco
8f3937d9fc Fix bounds computation of all 0-input filters.
The SkRectShaderImageFilter had the same bug as previously fixed for
SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste
the implementation, this change makes all filters with 0 inputs return
their source bounds, instead of returning false.

BUG=427251

Review URL: https://codereview.chromium.org/681643003
2014-10-29 12:36:32 -07:00
bungeman
a5cf665997 Issue acquire barrier in SkRefCnt::unique().
When unique() returns true, it must also issue an acquire barrier.
Note that this change may adversly impact SkPath performance,
but editing SkPaths is already a performance issue.

BUG=chromium:258499

No API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/687293002
2014-10-29 12:31:33 -07:00
bsalomon
81b0928673 fix typo in legacy flag alias
TBR=joshualitt@google.com
NOTRY=true

Review URL: https://codereview.chromium.org/675173005
2014-10-28 15:17:39 -07:00
bsalomon
f2703d83da rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags
Review URL: https://codereview.chromium.org/682223002
2014-10-28 14:33:06 -07:00
joshualitt
0e602827df Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2

Committed: https://skia.googlesource.com/skia/+/95f5194abce19e8ed875f3495fd16c79a9b931b4

Review URL: https://codereview.chromium.org/678073005
2014-10-28 10:27:44 -07:00
joshualitt
98102a8f79 Revert of Patch to remove constant attributes (patchset #8 id:120002 of https://codereview.chromium.org/678073005/)
Reason for revert:
I'll checkin tonight when the tree is quieter

Original issue's description:
> Working patch to remove constant attributes.  This may cause some gm mismatches, I will rebaseline tonight.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2
>
> Committed: https://skia.googlesource.com/skia/+/95f5194abce19e8ed875f3495fd16c79a9b931b4

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

Review URL: https://codereview.chromium.org/683203002
2014-10-28 09:08:35 -07:00
piotaixr
e5909d3d69 Override SkCanvas::drawImage[Rect]() in SkProxyCanvas
BUG=skia:2947

Review URL: https://codereview.chromium.org/679293002
2014-10-28 08:10:42 -07:00
joshualitt
95f5194abc Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2

Review URL: https://codereview.chromium.org/678073005
2014-10-28 07:54:54 -07:00
junov
ed53742e92 Add SK_API to global scope operators of SkMatrix
Review URL: https://codereview.chromium.org/678153002
2014-10-28 07:14:58 -07:00
hcm
d0f1969100 Revert of Fix bounds computation of all 0-input filters. (patchset #2 id:20001 of https://codereview.chromium.org/681643003/)
Reason for revert:
try again

Original issue's description:
> Fix bounds computation of all 0-input filters.
>
> The SkRectShaderImageFilter had the same bug as previously fixed for
> SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste
> the implementation, this change makes all filters with 0 inputs return
> their source bounds, instead of returning false.
>
> BUG=427251
>
> Committed: https://skia.googlesource.com/skia/+/ba036cc82b5a543a13cafd11a19ba0e3087fca38

TBR=bsalomon@google.com,senorblanco@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=427251

Review URL: https://codereview.chromium.org/678273002
2014-10-27 20:55:01 -07:00
joshualitt
9f2825f249 Revert of Patch to remove constant attributes (patchset #6 id:100001 of https://codereview.chromium.org/678073005/)
Reason for revert:
Breaks the K1

Original issue's description:
> Working patch to remove constant attributes.  This may cause some gm mismatches, I will rebaseline tonight.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2

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

Review URL: https://codereview.chromium.org/679363002
2014-10-27 17:56:18 -07:00
joshualitt
84c94c0dfd Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.
BUG=skia:

Review URL: https://codereview.chromium.org/678073005
2014-10-27 15:33:33 -07:00
senorblanco
ba036cc82b Fix bounds computation of all 0-input filters.
The SkRectShaderImageFilter had the same bug as previously fixed for
SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste
the implementation, this change makes all filters with 0 inputs return
their source bounds, instead of returning false.

BUG=427251

Review URL: https://codereview.chromium.org/681643003
2014-10-27 13:38:13 -07:00
egdaniel
27c1521ccf Add gpu support for glVertexAttrb1f, 2fv, and 3fv
BUG=skia:

Review URL: https://codereview.chromium.org/662583003
2014-10-24 15:00:50 -07:00
halcanary
f622a6c8fd Add SkIRect bounds() convenience method to SkImageInfo and SkBitmap.
Review URL: https://codereview.chromium.org/646213003
2014-10-24 12:54:53 -07:00
bsalomon
a0036c6e33 Delete unused method aliases and texture flag.
Committed: https://skia.googlesource.com/skia/+/7fdffe41494cbd78a8ee2a6ef0509e46ec77039f

Review URL: https://codereview.chromium.org/672753002
2014-10-24 12:46:57 -07:00
joshualitt
74077b9941 Added varying struct
TBR=
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/852ae80b9c3c6fd53f993ac35133d80863993cbe

Review URL: https://codereview.chromium.org/671023002
2014-10-24 11:26:03 -07:00
reed
e332396d2f move c api into include
BUG=skia:

Review URL: https://codereview.chromium.org/665203004
2014-10-24 11:16:19 -07:00
bsalomon
24234fe777 Build gpu stats tracking in dev builds.
Fix cache stats, add more info.

BUG=skia:2889

Review URL: https://codereview.chromium.org/655263005
2014-10-24 09:34:41 -07:00
joshualitt
c6f3e2c17b Revert of Added varying struct (patchset #9 id:160001 of https://codereview.chromium.org/671023002/)
Reason for revert:
may have caused gm change on arm

Original issue's description:
> Added varying struct
>
> TBR=
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/852ae80b9c3c6fd53f993ac35133d80863993cbe

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

Review URL: https://codereview.chromium.org/675193002
2014-10-24 08:24:08 -07:00
tfarina
20b7960798 Add isScale() helper function to SkMatrix44.
This will be used later in Chromium to cleanup gfx::Transform::IsScale2d().

BUG=408710,skia:997
TEST=None
R=bsalomon@google.com,danakj@chromium.org

Review URL: https://codereview.chromium.org/676583002
2014-10-24 08:07:05 -07:00
joshualitt
852ae80b9c Added varying struct
TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/671023002
2014-10-24 07:56:04 -07:00
jvanverth
b3eb687f8a Set temporary paths volatile so we don't cache them.
Any path that is generated frame-to-frame should not be rendered by using the
DistanceFieldPathRenderer, because generating the initial distance field,
uploading it and rendering it takes longer than the SoftwarePathRenderer.

BUG=skia:2935

Review URL: https://codereview.chromium.org/677463002
2014-10-24 07:12:51 -07:00