Commit Graph

13981 Commits

Author SHA1 Message Date
robertphillips
754f4e98d9 Add counting of some GL calls
I would like this facility for tracking FBO switch improvements.

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/553583008
2014-09-18 13:52:08 -07:00
cdalton
855d83ff79 Uses a single pre-baked set of paths for drawing nvpr text of a given
typeface. Loads the paths using the driver's glyph loading routines.

Refactors GrPathRange to accept a PathGenerator class that it uses to
lazily initialize its paths. The client code is no longer expected to
initialize the paths in a GrPathRange; instead it must provide a
PathGenerator* instance to createPathRange().

Adds a new createGlyphs() method to GrPathRendering that creates a
range of glyph paths, indexed by glyph id. GrPathRendering implements
createGlyphs() with a PathGenerator that loads glyph paths using the
skia frameworks. GrGLPathRendering uses glMemoryGlyphIndexArrayNV()
instead, when possible, to load the glyph paths.

Removes all GlyphPathRange logic from GrStencilAndCoverTextContext.
It instead uses createGlyphs().

BUG=skia:2939
R=bsalomon@google.com, jvanverth@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/563283004
2014-09-18 13:51:53 -07:00
reed
abfaf63bd0 remove no-op override
NOTREECHECKS=True
NOTRY=True
R=egdaniel@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/586463002
2014-09-18 13:36:11 -07:00
joshualitt
23e280d1f2 Changes to remove program effects builder
BUG=skia:
R=bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/551253004
2014-09-18 12:26:38 -07:00
robertphillips
1c4c528c2a Refactor layer hoisting code
This CL consolidates the layer hoisting functionality in GrLayerHoister in preparation for retiring SkDpuDevice::EXPERIMENTAL_drawPicture in favor of SkMultiPictureDraw::draw.

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/580173002
2014-09-18 12:03:15 -07:00
piotaixr
0d276f71d2 Bis: Use SkImage::NewFromGenerator() instead of SkImage::newEncodedData()
BUG=skia:2948
R=junov@chromium.org, reed@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/579923002
2014-09-18 11:55:14 -07:00
reed
0397e9f341 use surface in SkView/SampleApp
BUG=skia:
R=bsalomon@google.com, robertphillips@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/580073003
2014-09-18 11:29:01 -07:00
mtklein
9b222a5ddd Simplify a little in SkRecords.h:
- ACT_AS_PTR can just expose const methods to get at the pointers.
   (If the thing stored must stay const, we pass a const T.)
 - DrawPatch works fine with Record# macros, so use Record5.

BUG=skia:
R=fmalita@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/585523003
2014-09-18 11:16:31 -07:00
caryclark
a10742c69c update to accommodate latest clang in chrome toolchain
remove asserts for null pointers to references
change var args signature to pointer instead of array

R=mtklein@google.com, reed@android.com, reed@google.com, mtklein, reed

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/577243002
2014-09-18 11:00:40 -07:00
humper
95b7144adf fixes to linux build for webtry
BUG=skia:
R=jcgregorio@google.com

Author: humper@google.com

Review URL: https://codereview.chromium.org/578013003
2014-09-18 10:58:33 -07:00
bungeman
d71b757573 Serialize the font index.
BUG=skia:1186
R=reed@google.com

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/567013002
2014-09-18 10:55:32 -07:00
caryclark
65b427cff9 fix battlefield website by disallowing very small coordinates
also add and remove comments to document other attempts to fix this that had drawbacks

R=fmalita@chromium.org
BUG=414409

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/575553003
2014-09-18 10:32:57 -07:00
robertphillips
a0537deca2 Copy layer-hoisting related SkPaints
This is intended to disconnect the lifetimes of the optimization data, cached layers and replacement objects.

Note that the optimization data already makes a copy of the paint in the SkPicture. Additionally the replacement object will probably go away at some point.

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/579843002
2014-09-18 08:01:23 -07:00
mtklein
53d2562006 nanobench: print max RSS in debug mode too.
BUG=skia:2949
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/581083002
2014-09-18 07:39:42 -07:00
qiankun.miao
00a653239c Remove redundant assignment in GrDrawTarget.cpp
BUG=skia:
R=bsalomon@google.com

Author: qiankun.miao@intel.com

Review URL: https://codereview.chromium.org/552273003
2014-09-18 07:33:14 -07:00
reed
69f6f00fd9 use surface instead of explicitly making gpudevice
TBR=bsalomon

Author: reed@google.com

Review URL: https://codereview.chromium.org/585493002
2014-09-18 06:09:44 -07:00
borenet
613d579471 Update SKP version to 104
Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

Review URL: https://codereview.chromium.org/579993002
2014-09-17 21:26:41 -07:00
piotaixr
0e9770515c Use SkBitmapCache to optimize readPixels on a texture-backed bitmap
BUG=skia:2786
R=junov@chromium.org, reed@google.com, bsalomon@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/533323002
2014-09-17 16:24:05 -07:00
piotaixr
4bcc2021ff Use SkImage::NewFromGenerator() instead of SkImage::newEncodedData()
BUG=skia:2948
R=junov@chromium.org, reed@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/575173002
2014-09-17 14:33:30 -07:00
piotaixr
7b433f15de Small refactoring in SkImage_Codec
BUG=skia:2947
R=junov@chromium.org, reed@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/579773003
2014-09-17 13:05:14 -07:00
mtklein
53e0be6d2b DM: --gpu and --cpu should only control top-level tasks.
This fixes a bug where we run some Android bots with --nocpu, and the
current behavior disables the (CPU-bound) WriteTasks the GPU bound GM
runs spawn off.  The WriteTasks don't run and we end up with "null" in
our .json files.

Tested locally: out/Release/dm --nocpu -w /tmp/out; ls /tmp/out
  dm.json  gpu/

BUG=skia:2938
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/578033002
2014-09-17 12:26:18 -07:00
mtklein
6a5c7085bc Add SkMiniData.
This is a bit like a limited SkData, geared to store really tiny byte strings.

This is not hooked up anywhere beyond the new unit test.  I did experimentally
plumb it into SkRecord for drawPosTextH: just over 40% of drawPosTextH calls in
our repo can fit into ShortData.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/573323002
2014-09-17 12:21:59 -07:00
bungeman
ef59adba5b Clarify build test for presense of 'float copysign(float, float)'.
Clang-cl reports __cplusplus based on the version of clang instead of
reporting the __cplusplus the vc++ version _MSC_VER would.
This is important as the _MSC_VER also indicates which vc++ runtime
library will be used. As a result, do not trust the __cplusplus version
reported by clang-cl.

This change clarifies the intent of
https://skia.googlesource.com/skia/+/c34b0d4e9ad5806c1f882a1f85191f2ea8ddcdba

R=reed@google.com

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/576023003
2014-09-17 11:16:51 -07:00
reed
85265ffebe declare to gypi where SkDeviceProperties.h moved to
NOTRY=True
NOTREECHECKS=True
TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/574383002
2014-09-17 10:59:24 -07:00
reed
e010f1c2a0 hide deviceproperties, prepare the way for surfaceprops
BUG=skia:
NOTRY=True
R=bungeman@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/577023002
2014-09-17 10:49:38 -07:00
cdalton
4e205b1079 Remove createPath* from GrGpu and GrContext
Now that we have the GrPathRendering class, it doesn't make sense to
have a bunch of shims on on GrGpu. This updates the path rendering
clients to make calls directly on the GrPathRendering object.

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

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/578563002
2014-09-17 09:41:24 -07:00
cdalton
149b3ec2b1 Adds glMemoryGlyphIndexArrayNV to the GrGLInterface and begins
detecting support for this method in GrGLPathRendering.

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

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/570733002
2014-09-17 09:19:18 -07:00
humper
9a0267fa9a gyp build of skfiddle apps, take 2
BUG=skia:
R=jcgregorio@google.com

Author: humper@google.com

Review URL: https://codereview.chromium.org/553333004
2014-09-17 08:42:46 -07:00
egdaniel
a7dc0a83f0 Calculate stage stats in GrOptDrawState
BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/545693004
2014-09-17 08:25:05 -07:00
bsalomon
f96ba02513 Rename GrProgramResource to GrGpuResourceRef
BUG=skia:2889
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/574333003
2014-09-17 08:05:40 -07:00
robertphillips
4aa6dfc0b7 Separate replacement creation from layer discovery
This is a simple refactoring that sets the stage for eliminating GrReplacements::ReplacementInfo and splitting up EXPERIMENTAL_drawPicture to support multi picture draw.

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/559603004
2014-09-17 07:50:47 -07:00
bungeman
b374d6a62c Add onGetFamilyName to SkTypeface.
This speeds up and documents this particular feature of SkTypeface
and also frees up SkFontDescriptor to be used only in serialization.

R=reed@google.com

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/574873002
2014-09-17 07:48:59 -07:00
bsalomon
3850971d54 Revert "Revert "Move SkGpuDevice.h to src/gpu""
This reverts commit b0a35f7c5d.

R=borenet@google.com
TBR=borenet@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/575783003
2014-09-17 07:44:25 -07:00
Florin Malita
8bb9e1e412 Rebaseline textblob GM after acb882c
TBR=stephana@google.com

Review URL: https://codereview.chromium.org/575893003
2014-09-17 10:21:48 -04:00
joshualitt
408d6125b3 Breaking out full program and frag only
BUG=skia:
R=bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/576543005
2014-09-17 07:00:35 -07:00
mtklein
963504bd0a Revert of nanobench: lazily decode bitmaps from SKPs (patchset #1 id:1 of https://codereview.chromium.org/572933006/)
Reason for revert:
skia:2944

Original issue's description:
> nanobench: lazily decode bitmaps from SKPs
>
> This makes it considerably cheaper to run SKP recording benchmarks, without
> affecting their measurements and without really affecting SKP playback
> benchmarks at all.
>
> On my machine, running out/Release/nanobench --match skp --config nondrendering
> drops in run time from 6.7s to 2.5s, and the peak RAM usage drops from 129M to 50M.
>
> I'm strongly considering making this lazy decoding the default.
>
> BUG=skia:2944
>
> Committed: https://skia.googlesource.com/skia/+/d664c21a38de98d8db210c46f7a8c4187f1534da

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

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/554583004
2014-09-17 06:58:39 -07:00
borenet
b0a35f7c5d Revert "Move SkGpuDevice.h to src/gpu"
This reverts commit d99bbb61e5.

Causing Chrome canary failures as well as failures of Chrome trybots due to
not cleaning up properly after failed DEPS roll attempts.

BUG=skia:
R=bsalomon@google.com, reed@google.com
TBR=bsalomon, reed

Author: borenet@google.com

Review URL: https://codereview.chromium.org/579733003
2014-09-17 06:14:35 -07:00
robertphillips
e3371304b8 Fix typo
R=jvanverth@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/579753003
2014-09-17 06:01:07 -07:00
fmalita
acb882c239 Ensure blob typeface information survives SkGPipe serialization.
When flattening text blobs to the temp buffer, we need to collect
typeface info and ship it across the pipe explicitly.

R=mtklein@google.com, reed@google.com, robertphillips@google.com, bungeman@google.com
BUG=412445

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/563783003
2014-09-16 17:58:34 -07:00
bsalomon
d99bbb61e5 Move SkGpuDevice.h to src/gpu
R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/545193006
2014-09-16 14:09:13 -07:00
bsalomon
c49233410e Make templated GrProgramTResource subclass of GrProgramResource
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/563963004
2014-09-16 13:54:53 -07:00
mtklein
d664c21a38 nanobench: lazily decode bitmaps from SKPs
This makes it considerably cheaper to run SKP recording benchmarks, without
affecting their measurements and without really affecting SKP playback
benchmarks at all.

On my machine, running out/Release/nanobench --match skp --config nondrendering
drops in run time from 6.7s to 2.5s, and the peak RAM usage drops from 129M to 50M.

I'm strongly considering making this lazy decoding the default.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/572933006
2014-09-16 13:36:12 -07:00
egdaniel
170f90b457 Attach GrOptDrawState into shader building pipeline
The OptDrawState is now used for creating the actual gl shader. Current
optimizations dones in GrOptDrawState include:
All blend optimizations
Constant color/coverage stage optimizations

BUG=skia:

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

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

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/504203004
2014-09-16 12:54:40 -07:00
reed
3375c8047e when we disable lcd for impl reasons, add kGenA8 to document the original intent
BUG=skia:
R=bungeman@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/572933004
2014-09-16 12:27:55 -07:00
mtklein
1e78fc4ed2 Turn disable or delete optimizations that don't have any effect.
Recording gets a ~5% speedup.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/577673003
2014-09-16 11:11:20 -07:00
joshualitt
e3b051cf8b Adding myself to comitters
BUG=skia:
R=rmistry@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/579453002
2014-09-16 11:03:39 -07:00
reed
30ad5306be allow SkBitmapCache to operate on a local instance, for testability
BUG=skia:
R=mtklein@google.com, danakj@chromium.org, piotaixr@chromium.org, junov@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/576763002
2014-09-16 10:39:55 -07:00
robertphillips
4815fe5a0a Fix bug in layer hoisting transition to SkRecord backend
Care must be taken when setting up the initial CTM matrix for partial SkRecord playbacks b.c. all the setMatrix calls will concatenate with the initial matrix (which may be different then the CTM that is required to draw correctly).

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

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/549143003
2014-09-16 10:32:43 -07:00
mtklein
e1daac9b26 Tag recording picture nesting bench as nonrendering.
Doesn't hurt as is, but we're running it several times unneccesarily.

(I couldn't compile without removing an unused constant in that other GM...)

BUG=skia:
R=fmalita@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/570303002
2014-09-16 10:12:42 -07:00
robertphillips
c506e3007e Fix convexicator bug
BUG=crbug.com/412640
R=caryclark@google.com, bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/573763002
2014-09-16 09:43:32 -07:00