Commit Graph

258 Commits

Author SHA1 Message Date
reed
0846f1b1c4 remove (dead) SK_SUPPORT_LEGACY_DRAWDATA and SK_SUPPORT_LEGACY_CANVAS_VIRTUAL
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/844053002
2015-01-09 14:17:40 -08:00
reed
41af966ab3 Revert of Revert of move remaining virtual draw methods to onDraw (patchset #1 id:1 of https://codereview.chromium.org/835913002/)
Reason for revert:
test to see if it wasn't this CL that broke chromeos

Original issue's description:
> Revert of move remaining virtual draw methods to onDraw (patchset #5 id:80001 of https://codereview.chromium.org/817723005/)
>
> Reason for revert:
> did this cause chromeos heap corruption on skp?
>
> Original issue's description:
> > move remaining virtual draw methods to onDraw
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/2e0f7d53bba5438c9bf11ee5ccae2c301e348419
>
> TBR=robertphillips@google.com,djsollen@google.com,bsalomon@google.com,mtklein@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e87e383351e1547b21d96d02bcd0c3cbbe0837f1

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

Review URL: https://codereview.chromium.org/831253002
2015-01-05 07:49:08 -08:00
reed
e87e383351 Revert of move remaining virtual draw methods to onDraw (patchset #5 id:80001 of https://codereview.chromium.org/817723005/)
Reason for revert:
did this cause chromeos heap corruption on skp?

Original issue's description:
> move remaining virtual draw methods to onDraw
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2e0f7d53bba5438c9bf11ee5ccae2c301e348419

TBR=robertphillips@google.com,djsollen@google.com,bsalomon@google.com,mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/835913002
2015-01-05 04:49:38 -08:00
reed
2e0f7d53bb move remaining virtual draw methods to onDraw
BUG=skia:

Review URL: https://codereview.chromium.org/817723005
2015-01-04 21:09:04 -08:00
reed
c4fda92f45 remove unused drawData
BUG=skia:

Review URL: https://codereview.chromium.org/830083002
2015-01-02 06:39:51 -08:00
reed
0acf1b4b36 add private flag for sprite-as-bitmap
BUG=skia:3272

Review URL: https://codereview.chromium.org/806853005
2014-12-22 16:12:38 -08:00
reed
d990e2f14f add testing flag to ignore saveLayer bounds
BUG=skia:

Review URL: https://codereview.chromium.org/819123003
2014-12-22 11:58:30 -08:00
reed
f7430ccfc0 removed dead SK_SUPPORT_LEGACY_DRAWTEXT_VIRTUAL code
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/817193002
2014-12-21 11:38:35 -08:00
junov
3fcc125c77 Remove SkCanvas::isDrawingToLayer
BUG=3245

Review URL: https://codereview.chromium.org/803913005
2014-12-15 11:34:06 -08:00
mtklein
f0f1411343 Cull pushCull and popCull from Skia.
These calls are unused and going away.  Waiting on crrev.com/796083002.

BUG=skia:

Review URL: https://codereview.chromium.org/794263002
2014-12-12 08:46:25 -08:00
reed
2ff1fcede1 Defer saves() until they're needed
patch from issue 759443006 at patchset 40001 (http://crrev.com/759443006#ps40001)

BUG=skia:

Review URL: https://codereview.chromium.org/767333002
2014-12-11 07:07:38 -08:00
Florin Malita
c54d8db4d1 Remove SkCanvas::drawBitmapMatrix()
R=mtklein@google.com, reed@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/789033002
2014-12-10 12:02:16 -05:00
reed
3054be16df Remove canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)

BUG=skia:
TBR=
re-landing after chrome fixes have landed

Review URL: https://codereview.chromium.org/784223007
2014-12-10 07:24:28 -08:00
reed
a8918a0650 Revert of remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul (patchset #3 id:40001 of https://codereview.chromium.org/790733003/)
Reason for revert:
need to update chrome first

Original issue's description:
> remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
>
> patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2c1605a1fbaa2e35a27399a34254fb1200ec2ae6

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

Review URL: https://codereview.chromium.org/791763002
2014-12-09 13:55:20 -08:00
reed
2c1605a1fb remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)

BUG=skia:

Review URL: https://codereview.chromium.org/790733003
2014-12-09 12:33:38 -08:00
reed
f4e0d9eb2d clear() is now an alias for drawPaint, so remove its virtual
Needs these to land first:
https://codereview.chromium.org/733343005
https://codereview.chromium.org/777413004

BUG=skia:

Review URL: https://codereview.chromium.org/780393002
2014-12-05 20:49:03 -08:00
reed
8eddfb50c0 Change clear() to respect the clip
This reverts commit af641a1c10.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/783493002
2014-12-04 07:50:14 -08:00
reed
af641a1c10 Revert "Change clear() to respect the clip"
This reverts commit 3729469d6a.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/778563002
2014-12-02 19:40:18 -08:00
reed
3729469d6a Change clear() to respect the clip
patch from issue 769703002 at patchset 1 (http://crrev.com/769703002#ps1)

BUG=skia:

Review URL: https://codereview.chromium.org/772533004
2014-12-02 10:08:11 -08:00
fmalita
2d97bc139a Disable LCD text explicitly in SkPictureImageFilter::onFilterImage()
As an intermediate fix for
https://code.google.com/p/skia/issues/detail?id=3142, we can use a
non-public SkCanvas constructor and force-disable LCD text.

BUG=skia:3142
R=reed@google.com,senorblanco@google.com

Review URL: https://codereview.chromium.org/725243004
2014-11-20 10:44:58 -08:00
reed
78e2768897 Allow pictures to have a full bounds
This reverts commit 7c4cdd2c5b.

BUG=skia:

Review URL: https://codereview.chromium.org/738083002
2014-11-19 08:04:34 -08:00
reed
7c4cdd2c5b Revert of allow pictures to have a full bounds (patchset #3 id:40001 of https://codereview.chromium.org/736583004/)
Reason for revert:
needed to update legacy width() helpers

Original issue's description:
> allow pictures to have a full bounds
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7e76bff26e7c74902841ca4f607eb0b24a833a4a

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

Review URL: https://codereview.chromium.org/722043005
2014-11-19 07:17:17 -08:00
reed
7e76bff26e allow pictures to have a full bounds
BUG=skia:

Review URL: https://codereview.chromium.org/736583004
2014-11-19 06:59:41 -08:00
djsollen
c87dd2ce96 Enable unused param checking for public includes.
This CL cleans up the existing violations and enables the
build time check to ensure that we don't regress.

The motiviation behind this change is to allow clients who include
our headers to be able to build with this warning enabled.

Review URL: https://codereview.chromium.org/726923002
2014-11-14 11:11:46 -08:00
reed
b2db898573 rename filterTextFlags to disableLCD
Under the hood, add SkPixelGeometry to the CreateInfo for new devices, allowing them to see their geometry (SkDeviceProperties) up front, rather than having it changed later.

The only exception is for devices that are used on the root-layer, where we don't see the device until after the fact (at least as long as we allow clients to attach a device to a canvas externally).

We also filter the geometry when we're creating a layer, so we can disable LCD text automatically if the layer is not marked as opaque.

NOTRY=True
-- gammatext flake?

Review URL: https://codereview.chromium.org/719253002
2014-11-13 12:41:02 -08:00
reed
6a070dc06a experimental
BUG=skia:

Review URL: https://codereview.chromium.org/716793004
2014-11-11 19:36:10 -08:00
robertphillips
81f71b6630 Change where layer hoisting data is gathered
This CL:
1) removes the EXPERIMENTAL_optimize on SkCanvas & SkDevice
2) moves the saveLayer gathering step to endRecording
3) Replaces GPUOptimize with SkRecordComputeLayers
4) Update bench_pictures & render_pictures to provide the new flag

#2 also necessitated moving the BBH computation (and record optimization) out of SkPicture's ctor (and into endRecording)

Review URL: https://codereview.chromium.org/718443002
2014-11-11 04:54:49 -08:00
tfarina
a5414c4a8e Turn SkCanvasStateUtils into a class with static functions.
That simplifies the way to declare it a friend, as needed in SkCanvas.

BUG=skia:2914
TEST=make most
R=reed@google.com

Review URL: https://codereview.chromium.org/645773002
2014-10-10 06:19:09 -07:00
piotaixr
d52893cfc8 Add doc on SkCanvas::drawImage*() methods
BUG=skia:2947
R=junov@chromium.org, reed@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/595043002
2014-09-25 14:39:40 -07:00
piotaixr
b5fae93d72 SkCanvas::drawImage is the new way for drawing a SkImage to a Canvas
BUG=skia:2947

Committed: https://skia.googlesource.com/skia/+/432789972c1e1f8a66165c75a250dba1853efa08

R=junov@chromium.org, reed@google.com, bsalomon@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/583453002
2014-09-24 13:03:30 -07:00
borenet
2456b7681a Revert of SkCanvas::drawImage is the new way for drawing an SkImage to a Canvas (patchset #9 id:160001 of https://codereview.chromium.org/583453002/)
Reason for revert:
Broke ChromiumOS Ozone builder: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Ozone%20Builder/builds/4087/steps/compile/logs/stdio

Reverting to unblock DEPS roll.

Original issue's description:
> SkCanvas::drawImage is the new way for drawing a SkImage to a Canvas
>
> BUG=skia:2947
>
> Committed: https://skia.googlesource.com/skia/+/432789972c1e1f8a66165c75a250dba1853efa08

R=junov@chromium.org, reed@google.com, bsalomon@google.com, piotaixr@chromium.org
TBR=bsalomon@google.com, junov@chromium.org, piotaixr@chromium.org, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2947

Author: borenet@google.com

Review URL: https://codereview.chromium.org/598133002
2014-09-24 11:03:35 -07:00
piotaixr
432789972c SkCanvas::drawImage is the new way for drawing a SkImage to a Canvas
BUG=skia:2947
R=junov@chromium.org, reed@google.com, bsalomon@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/583453002
2014-09-23 14:10:50 -07:00
reed
4a8126e7f8 Introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/)"
This reverts commit 29c857d0f3.

TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/588143004
2014-09-22 07:29:03 -07:00
reed
29c857d0f3 Revert of introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/)
Reason for revert:
Broke call site in WebKit

Original issue's description:
> introduce Props to surface (work in progress)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3716fd067a5621bb94a6cb08d72afec8bf3aceda

R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@google.com
TBR=bsalomon@google.com, bungeman@google.com, fmalita@google.com, jvanverth@google.com, reed@google.com, robertphillips@google.com, vangelis@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/583773004
2014-09-21 10:25:07 -07:00
reed
3716fd067a introduce Props to surface (work in progress)
BUG=skia:
R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/551463004
2014-09-21 09:39:55 -07:00
reed
d954498c01 Revert of Revert of allow canvas to force conservative clips (for speed) (patchset #1 id:1 of https://codereview.chromium.org/554033003/)
Reason for revert:
May just rebaseline, plus want to see the results of the chrome tests, so re-trying this CL.

Original issue's description:
> Revert of allow canvas to force conservative clips (for speed) (patchset #7 id:120001 of https://codereview.chromium.org/541593005/)
>
> Reason for revert:
> multipicturedraw failed on nvprmsaa -- don't know why yet
>
> Original issue's description:
> > Allow SkCanvas to be initialized to force conservative rasterclips. This has the following effects:
> >
> > 1. Queries to the current clip will be conservatively large. This can mean the quickReject may return false more often.
> >
> > 2. The conservative clips mean less work is done.
> >
> > 3. Enabled by default for Gpu, Record, and NoSaveLayer canvases.
> >
> > 4. API is private for now.
> >
> > Committed: https://skia.googlesource.com/skia/+/27a5e656c3d6ef22f9cb34de18e1b960da3aa241
>
> TBR=robertphillips@google.com,bsalomon@google.com,mtklein@google.com,junov@google.com
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/6f09709519b79a1159f3826645f1c5fbc101ee11

R=robertphillips@google.com, bsalomon@google.com, mtklein@google.com, junov@google.com, reed@google.com
TBR=bsalomon@google.com, junov@google.com, mtklein@google.com, reed@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/560713002
2014-09-09 18:46:22 -07:00
reed
6f09709519 Revert of allow canvas to force conservative clips (for speed) (patchset #7 id:120001 of https://codereview.chromium.org/541593005/)
Reason for revert:
multipicturedraw failed on nvprmsaa -- don't know why yet

Original issue's description:
> Allow SkCanvas to be initialized to force conservative rasterclips. This has the following effects:
>
> 1. Queries to the current clip will be conservatively large. This can mean the quickReject may return false more often.
>
> 2. The conservative clips mean less work is done.
>
> 3. Enabled by default for Gpu, Record, and NoSaveLayer canvases.
>
> 4. API is private for now.
>
> Committed: https://skia.googlesource.com/skia/+/27a5e656c3d6ef22f9cb34de18e1b960da3aa241

R=robertphillips@google.com, bsalomon@google.com, mtklein@google.com, junov@google.com
TBR=bsalomon@google.com, junov@google.com, mtklein@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: reed@google.com

Review URL: https://codereview.chromium.org/554033003
2014-09-09 12:51:10 -07:00
reed
27a5e656c3 Allow SkCanvas to be initialized to force conservative rasterclips. This has the following effects:
1. Queries to the current clip will be conservatively large. This can mean the quickReject may return false more often.

2. The conservative clips mean less work is done.

3. Enabled by default for Gpu, Record, and NoSaveLayer canvases.

4. API is private for now.

R=robertphillips@google.com, bsalomon@google.com, mtklein@google.com, junov@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/541593005
2014-09-09 12:19:30 -07:00
bsalomon
49f085dddf "NULL !=" = NULL
R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
2014-09-05 13:34:00 -07:00
reed
8f2e791baa add SK_API to forward declare in canvas.h
NOTRY=True
TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/541073002
2014-09-04 12:45:18 -07:00
reed
fa35f8e6eb remove getTotalClipAsPath, privatize getTotalClip
R=robertphillips@google.com, djsollen@google.com
TBR=robertphilips

Author: reed@google.com

Review URL: https://codereview.chromium.org/546493002
2014-09-04 12:14:36 -07:00
fmalita
00d5c2c652 SkTextBlob
Initial implementation.

R=bungeman@google.com, jbroman@chromium.org, mtklein@google.com, reed@google.com, robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/473633002
2014-08-21 08:53:26 -07:00
reed
8bf3df68c5 remove code for (dead) SK_SUPPORT_LEGACY_GETCLIPTYPE
BUG=skia:
R=djsollen@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/489103003
2014-08-21 05:51:22 -07:00
mtklein
6cfa73a29a Start tracking the CTM while filling the BBH in SkRecordDraw.
Depends on https://codereview.chromium.org/475473002/

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/468193003
2014-08-13 13:33:49 -07:00
dandov
b3c9d1c33c SkCanvas::drawPatch param SkPoint[12]
drawPatch now receives as parameter const SkPoint cubics[12]

Adjusted derived classes and serialization.

Ajusted GM's and benches that take into account combinations of optional
parameters, the scale of the patch and 4 different types of patches.

Planning on adding the extra functionality of SkPatch in another CL.

BUG=skia:
R=egdaniel@google.com, reed@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/463493002
2014-08-12 08:34:29 -07:00
reed
872e3dc89d Revert of Revert of remove (now unneeded) legacy onDrawPicture variant (https://codereview.chromium.org/457253002/)
Reason for revert:
webkit has been updated, so re-landing

Original issue's description:
> Revert of remove (now unneeded) legacy onDrawPicture variant (https://codereview.chromium.org/456203002/)
>
> Reason for revert:
> still need to update ProfilingCanvas in blink
>
> Original issue's description:
> > remove (now unneeded) legacy onDrawPicture variant
> >
> > TBR=fmalita@google.com
> >
> > Committed: https://skia.googlesource.com/skia/+/2e69d292e5a389db7d9264eb66172376692de8ca
>
> TBR=
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/47f9bdcc3d741a63935c52bfe85db44ab13f66f2

R=reed@chromium.org
TBR=reed@chromium.org
NOTREECHECKS=true
NOTRY=true

Author: reed@google.com

Review URL: https://codereview.chromium.org/460693002
2014-08-11 06:35:48 -07:00
reed
47f9bdcc3d Revert of remove (now unneeded) legacy onDrawPicture variant (https://codereview.chromium.org/456203002/)
Reason for revert:
still need to update ProfilingCanvas in blink

Original issue's description:
> remove (now unneeded) legacy onDrawPicture variant
>
> TBR=fmalita@google.com
>
> Committed: https://skia.googlesource.com/skia/+/2e69d292e5a389db7d9264eb66172376692de8ca

TBR=
NOTREECHECKS=true
NOTRY=true

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/457253002
2014-08-10 19:04:01 -07:00
reed
2e69d292e5 remove (now unneeded) legacy onDrawPicture variant
TBR=fmalita@google.com

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/456203002
2014-08-10 11:28:46 -07:00
reed
d5fa1a455a add drawPicture variant that takes a matrix and paint
will need some staging strategy, since chrome and blink have overrides of onDrawPicture

R=robertphillips@google.com, fmalita@google.com, bsalomon@google.com, mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/448793004
2014-08-09 11:08:05 -07:00
reed
3b1c3d2c61 add dummy onDrawPicture to allow migration for chrome overrides
after this lands in chrome, land these two CLs
https://codereview.chromium.org/454993002/
https://codereview.chromium.org/454143003

then land this skia CL
https://codereview.chromium.org/448793004/

then remove the onDrawPicture overrides from chrome

R=fmalita@google.com, robertphillips@google.com

Author: reed@google.com

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