Commit Graph

941 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
joshualitt
852ae80b9c Added varying struct
TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/671023002
2014-10-24 07:56:04 -07:00
bsalomon
26979c8260 Revert of Delete unused method aliases and texture flag. (patchset #1 id:1 of https://codereview.chromium.org/672753002/)
Reason for revert:
Need to remove one more reference to this in blink before relanding.

Original issue's description:
> Delete unused method aliases and texture flag.
>
> Committed: https://skia.googlesource.com/skia/+/7fdffe41494cbd78a8ee2a6ef0509e46ec77039f

TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/671203002
2014-10-23 07:41:29 -07:00
bsalomon
7fdffe4149 Delete unused method aliases and texture flag.
Review URL: https://codereview.chromium.org/672753002
2014-10-23 06:56:55 -07:00
bsalomon
427cf28861 Remove AutoScratchTexture
Remove AST from GrClipMaskCache

Remove AST from GrClipMaskManager

BUG=skia:2889

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/663583002
2014-10-16 13:41:43 -07:00
bsalomon
420d7e9a79 Auto-compare GrProcessors' texture accesses in isEqual().
R=joshualitt@google.com

Review URL: https://codereview.chromium.org/654313002
2014-10-16 09:18:09 -07:00
kkinnunen
30bc88ccd5 Refactor SkGLContext to be actually extendable
Refactor SkGLContext to be actually extendable. Before, non-trivial subclass
would need to destroy the GL connection upon running the destructor. However,
the base class would run GL commands in its own destructor (with destroyed GL
connection)

Refactor so that SkGLContext subclass object creation is completely done by
the factory function. If the factory function returns a non-NULL ptr, it means the context
is usable.

The destruction is done with the destructor instead of virtual function called
upon destruction. Make the destructors not to call virtual functions, for
clarity.

Remove custom 1x1 FBO setup code from the base class. It appears not to be used
anymore.

BUG=skia:2992

Review URL: https://codereview.chromium.org/640283004
2014-10-15 23:03:54 -07:00
bsalomon
de258cd6b4 Make GrFragmentProcessor auto-compare coord xforms.
Review URL: https://codereview.chromium.org/657923002
2014-10-15 19:06:21 -07:00
bsalomon
f2765410ba Last round of effect->processor (for now)
R=joshualitt@google.com

Review URL: https://codereview.chromium.org/659803005
2014-10-15 18:34:46 -07:00
egdaniel
9e4d6d180f Move willUseInputColor check to computeInvariantOutput
BUG=skia:

Review URL: https://codereview.chromium.org/656503002
2014-10-15 13:49:02 -07:00
bsalomon
b762cb548b More effect->processor cleanup
R=joshualitt@google.com

Review URL: https://codereview.chromium.org/660563003
2014-10-15 11:25:21 -07:00
bsalomon
98b33ebe6f Some cleanup in processor header files.
R=joshualitt@google.com

Review URL: https://codereview.chromium.org/659803004
2014-10-15 11:05:26 -07:00
bsalomon
6251d17dfa Split GrFragmentProcessor into its own header
Review URL: https://codereview.chromium.org/660573002
2014-10-15 10:50:36 -07:00
bsalomon
0e08fc17e4 Push isEqual/onIsEqual down from GrProcessor to subclasses.
R=joshualitt@google.com

Review URL: https://codereview.chromium.org/654273002
2014-10-15 08:19:04 -07:00
bsalomon
e30597375c Remove uses of GrAutoScratchTexture.
Rename GrContext::lockAndRefScratchTexture to refScratchTexture.

GrSurface::writePixels returns bool instead of void.

BUG=skia:2889

Review URL: https://codereview.chromium.org/638403003
2014-10-14 11:47:22 -07:00
egdaniel
ab84fae29f Track if all stages modulate inputColor in computeInvariantOutput
BUG=skia:

Review URL: https://codereview.chromium.org/647863002
2014-10-14 06:48:46 -07:00
egdaniel
ccb2e384a0 Create helper functions to use in computeInvariantOutput calls
BUG=skia:

Review URL: https://codereview.chromium.org/643743003
2014-10-13 12:53:46 -07:00
bsalomon
81beccc4fb Devirtualize read/write pixels on surface.
Consolidate read/write funcs in context.

Remove support for reading pixels from a surface that's not a target. It's currently broken and neither used nor tested.

Review URL: https://codereview.chromium.org/648863002
2014-10-13 12:32:55 -07:00
joshualitt
a5305a110a Opt state takes a GP instead of a GeometryStage
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/71856d520461ae025a0332aa0ce9735a096d9baf

Review URL: https://codereview.chromium.org/637003003
2014-10-10 17:47:00 -07:00
joshualitt
89c7a2ec3e Revert of Opt state takes a GP instead of a GeometryStage (patchset #18 id:1500001 of https://codereview.chromium.org/637003003/)
Reason for revert:
Revert because this may be causing a break in a chrome gpu test

Original issue's description:
> Opt state takes a GP instead of a GeometryStage
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/71856d520461ae025a0332aa0ce9735a096d9baf

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

Review URL: https://codereview.chromium.org/647183002
2014-10-10 14:11:59 -07:00
jvanverth
294c32612d Fix color emoji.
Removes the GrMaskFormat and single atlas in GrTextStrike.
Replaces it by storing the GrMaskFormat in each GrGlyph, and
doing a lookup for the correct atlas based on that.

Disables color glyph rendering in GrDistanceFieldTextContext
for now.

BUG=skia:2887

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

Review URL: https://codereview.chromium.org/636183005
2014-10-10 11:36:12 -07:00
joshualitt
71856d5204 Opt state takes a GP instead of a GeometryStage
BUG=skia:

Review URL: https://codereview.chromium.org/637003003
2014-10-10 09:56:55 -07:00
jvanverth
e817dbb889 Revert of Fix color emoji. (patchset #11 id:320001 of https://codereview.chromium.org/636183005/)
Reason for revert:
Crashing the Windows bots.

Original issue's description:
> Fix color emoji.
>
> Removes the GrMaskFormat and single atlas in GrTextStrike.
> Replaces it by storing the GrMaskFormat in each GrGlyph, and
> doing a lookup for the correct atlas based on that.
>
> Disables color glyph rendering in GrDistanceFieldTextContext
> for now.
>
> BUG=skia:2887
>
> Committed: https://skia.googlesource.com/skia/+/bc92163ddfe957ad6ffbb02ac40e0ba75ff82216

TBR=robertphillips@google.com,bungeman@google.com,reed@google.com,bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2887

Review URL: https://codereview.chromium.org/640413004
2014-10-10 08:52:03 -07:00
jvanverth
bc92163ddf Fix color emoji.
Removes the GrMaskFormat and single atlas in GrTextStrike.
Replaces it by storing the GrMaskFormat in each GrGlyph, and
doing a lookup for the correct atlas based on that.

Disables color glyph rendering in GrDistanceFieldTextContext
for now.

BUG=skia:2887

Review URL: https://codereview.chromium.org/636183005
2014-10-10 08:21:29 -07:00
joshualitt
9e87fa7c0e Force linking of static member variables for GLPrograms
BUG=skia:

Review URL: https://codereview.chromium.org/614163002
2014-10-09 13:12:35 -07:00
bsalomon
1e2530babb Use presence of a content key as non-scratch indicator
BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/9eefe0851eeaa8ded05b4774ebcb38ed201d5dbf

Review URL: https://codereview.chromium.org/639873002
2014-10-09 09:57:18 -07:00
joshualitt
651713408c gl programs rewrite
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/07a255310aca9f3e83bf741dc663a58818ad681c

Review URL: https://codereview.chromium.org/628633003
2014-10-09 07:25:36 -07:00
kkinnunen
9e61bb7815 Make the Sk GL context class an abstract base class
Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
it depended on ifdefs to implement the platform dependent polymorphism.  Move
the logic to subclasses of the various platform implementations.

This a step to enable Skia embedders to compile dm and bench_pictures. The
concrete goal is to support running these test apps with Chromium command buffer.

With this change, Chromium can implement its own version of SkGLNativeContext
that uses command buffer, and host the implementation in its own repository.

Implements the above by renaming the SkGLContextHelper to SkGLContext and
removing the unneeded SkGLNativeContext. Also removes
SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
no use in Skia code, and no tests.

BUG=skia:2992

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

Review URL: https://codereview.chromium.org/630843002
2014-10-09 05:24:15 -07:00
bsalomon
ac211af359 call derived ~ from GrIORef
TBR=mtklein@google.com
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/641813002
2014-10-08 12:36:54 -07:00
bsalomon
81e64484ff Remove ~GrIORef since last remaining virtual and now all inline
TBR=reed@google.com
NOTRY=true

Review URL: https://codereview.chromium.org/638003003
2014-10-08 11:42:10 -07:00
bsalomon
0f9e8a720c Revert of Use presence of a content key as non-scratch indicator (patchset #5 id:80001 of https://codereview.chromium.org/639873002/)
Reason for revert:
breaking nanobench on ubuntu

Original issue's description:
> Use presence of a content key as non-scratch indicator
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/9eefe0851eeaa8ded05b4774ebcb38ed201d5dbf

TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889

Review URL: https://codereview.chromium.org/642493003
2014-10-08 11:21:33 -07:00
bsalomon
9eefe0851e Use presence of a content key as non-scratch indicator
BUG=skia:2889

Review URL: https://codereview.chromium.org/639873002
2014-10-08 10:48:15 -07:00
bsalomon
544fe2338f Add SK_API to GrGpuResource
TBR=reed@google.com

Review URL: https://codereview.chromium.org/638963003
2014-10-08 10:24:07 -07:00
bsalomon
bcf0a52d4f GrResourceCache2 manages scratch texture.
BUG=skia:2889

Review URL: https://codereview.chromium.org/608883003
2014-10-08 08:40:09 -07:00