Commit Graph

16235 Commits

Author SHA1 Message Date
halcanary
07d5947b88 PDF: remove unused SkPDFDevice::setDCTEncoder()
All image compression currently uses (losseless) Deflate, not
Jpeg.  See http://crrev.com/935843007

Review URL: https://codereview.chromium.org/946493002
2015-02-20 05:57:11 -08:00
reed
b92b706dfd Revert of Make SkPixelRef::isLocked() debug-only, remove related dead code. (patchset #1 id:1 of https://codereview.chromium.org/940083002/)
Reason for revert:
Broke callers in chrome

../../skia/ext/platform_canvas_unittest.cc:421:56: error: no member named 'isLocked' in 'SkPixelRef'
  EXPECT_TRUE(platform_bitmap->GetBitmap().pixelRef()->isLocked());

Original issue's description:
> Make SkPixelRef::isLocked() debug-only, remove related dead code.
>
> DM's okay locally with no diffs, no failures.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8e65712486c66108677a9b0a55ad3e7ca94db555

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

Review URL: https://codereview.chromium.org/940323003
2015-02-19 20:00:33 -08:00
halcanary
56f4ace232 PDF: Remove SkPDFDeviceFlattener
There are no clients.

TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/937333002
2015-02-19 18:55:05 -08:00
halcanary
8c92dc1dc2 Remove unused parameters to SkDocument::CreatePDF
All image compression currently uses (losseless) Deflate, not Jpeg.

All clients simply use SkDocument::CreatePDF(stream).

SampleApp and SkLua still use SkDocument::CreatePDF(path).

Review URL: https://codereview.chromium.org/935843007
2015-02-19 18:50:05 -08:00
mtklein
8e65712486 Make SkPixelRef::isLocked() debug-only, remove related dead code.
DM's okay locally with no diffs, no failures.

BUG=skia:

Review URL: https://codereview.chromium.org/940083002
2015-02-19 18:50:00 -08:00
scroggo
87fa631969 Rename onGetPixelsEnum back to onGetPixels.
Replace the old signature of onGetPixels (return bool) to return an
enum (Result). Remove onGetPixelsEnum.

Add a define for onGetPixelsEnum to onGetPixels. This is for staging
in Chromium, where some implementations override onGetPixelsEnum.

Add the define in skia_for_chromium_defines. Remove
SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN, which is no longer needed by
Chromium.

BUG=skia:3257

Review URL: https://codereview.chromium.org/939113002
2015-02-19 18:44:58 -08:00
fmalita
8974774c32 [SkSVGDevice] Fix whitespace text handling
SVG ignores leading/trailing whitespace and consolidates mid-text
(http://www.w3.org/TR/SVG/text.html#WhiteSpace). This can cause our
x/y position indices to get out of whack.

Implement a text builder which is SVG whitespace-munging-aware and
performs the needed x/y position list adjustments.

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

Review URL: https://codereview.chromium.org/928583003
2015-02-19 18:44:51 -08:00
reed
0c2da0c99f use geometric ave for choosing mip level
requires https://codereview.chromium.org/937233002/

BUG=skia:

Review URL: https://codereview.chromium.org/916103008
2015-02-19 18:39:49 -08:00
djsollen
176cd92a61 Allow either the old or new version of ADB on mac.
Review URL: https://codereview.chromium.org/926003002
2015-02-19 18:39:40 -08:00
bsalomon
b602d4dff8 Speculative fix for nexus player unit test failure
TBR=robertphillips@google.com

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/941433006
2015-02-19 12:05:58 -08:00
reed
c8e4765b8e gm to illustrate mipmap layer choice
BUG=skia:
NOTREECHECKS=True
TBR=

Review URL: https://codereview.chromium.org/942593002
2015-02-19 11:39:46 -08:00
bsalomon
ddf30e64fe Handle the case when the GrResourceCache timestamp wraps.
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/916103006
2015-02-19 11:38:45 -08:00
joshualitt
6364807151 gm to test hairlines which fill RenderTarget
BUG=skia:

Review URL: https://codereview.chromium.org/934283002
2015-02-19 10:25:21 -08:00
bsalomon
02a44a4886 Recycle stencil buffers across render targets.
Review URL: https://codereview.chromium.org/939093002
2015-02-19 09:09:00 -08:00
mtklein
90c6bc4e85 Revert of notify resource caches when pixelref genID goes stale (patchset #4 id:60001 of https://codereview.chromium.org/825263005/)
Reason for revert:
Crazy failures.

http://build.chromium.org/p/client.skia/builders/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug/builds/1428/steps/dm/logs/stdio

Original issue's description:
> notify resource caches when pixelref genID goes stale
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4675819b9dbb3ad71ec851776e5de26d342f29fe

TBR=bsalomon@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/936423002
2015-02-19 08:53:52 -08:00
mtklein
cabc08c429 PDF: why do we have flags no one uses (or can use)?
BUG=skia:

Review URL: https://codereview.chromium.org/936403002
2015-02-19 08:29:24 -08:00
jvanverth
ce07afb8fa Update fontcache gm to actually stress font atlas
BUG=skia:

Review URL: https://codereview.chromium.org/933313004
2015-02-19 08:28:02 -08:00
bsalomon
f99e961f55 Allow resources' unique keys to be changed.
Review URL: https://codereview.chromium.org/938943002
2015-02-19 08:24:16 -08:00
reed
4675819b9d notify resource caches when pixelref genID goes stale
BUG=skia:

Review URL: https://codereview.chromium.org/825263005
2015-02-19 08:22:54 -08:00
bungeman
67b21a7eef Revert of disable gammatext gm for a while, looking for other flakes (patchset #1 id:1 of https://codereview.chromium.org/725303002/)
Reason for revert:
We now have gold!!!

Original issue's description:
> disable gammatext gm for a while, looking for other flakes
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/64c04882701d9ee3bbbf23d8c02c8d96c5a51719

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/943673002
2015-02-19 07:45:14 -08:00
bungeman
e89261609a Clarify desired behavior of FontConfigTypeface::LegacyCreateTypeface.
This should have no real effect on behavior, but cleans up some names
and removes an unused parameter. This is a step toward separating the
SkTypeface cache from the request cache.

Review URL: https://codereview.chromium.org/936893002
2015-02-19 07:29:28 -08:00
halcanary
07327bff1b move SkPDFD*.h from include to src
CQ_INCLUDE_TRYBOTS=client.skia:Mac Builder-Trybot,Linux Builder-Trybot,Win Builder-Trybot

Review URL: https://codereview.chromium.org/727343002
2015-02-19 07:26:13 -08:00
bsalomon
8718aafec2 Rename GrContentKey to GrUniqueKey
Review URL: https://codereview.chromium.org/940463006
2015-02-19 07:24:21 -08:00
kkinnunen
2e4414e60b Do not clear the source device in SkGpuDevice::drawDevice
Do not clear the source device in SkGpuDevice::drawDevice based on
the status whether the destination device needs a clear.

Source device clear is flushed in SkGpuDevice::accessRenderTarget()
and target device clear is flushed in CHECK_SHOULD_DRAW(draw).

Review URL: https://codereview.chromium.org/943623002
2015-02-19 07:20:40 -08:00
kkinnunen
297aaf97a3 Avoid wrong memory access due to double substitution and %%
Use the form SkDebugf("%s", arbitraryString) instead of
SkDebugf(arbitraryString).

Fixes the case where SkString::appendf-ing a string with "%%" and then
printing the string with SkDebugf would cause uninitialized read and
corrupted debug print.

ninja -C out/Debug tools && valgrind --leak-check=full
./out/Debug/render_pictures --config gpu  -w q -r ...

...

==7307== Conditional jump or move depends on uninitialised value(s)
==7307==    at 0x6908475: __printf_fp (printf_fp.c:1180)
==7307==    by 0x6904267: vfprintf (vfprintf.c:1629)
==7307==    by 0x6906E53: buffered_vfprintf (vfprintf.c:2313)
==7307==    by 0x690188D: vfprintf (vfprintf.c:1316)
==7307==    by 0x67E8F5: SkDebugf(char const*, ...) (SkDebug_stdio.cpp:18)
==7307==    by 0x7983F1: GrContext::printCacheStats() const (GrTest.cpp:54)
==7307==    by 0x408ECF: tool_main(int, char**) (render_pictures_main.cpp:480)
==7307==    by 0x40913E: main (render_pictures_main.cpp:511)
==7307==
Budget: 2048 items 100663296 bytes
		Entry Count: current 652 (651 budgeted, 0 wrapped, 297 locked, 638 scratch 32 0.000000ull), high 652
		Entry Bytes: current 51087658 (budgeted 49826658, 49 0.000000ull, 1261000 unbudgeted) high 51087658

(observe "ull" instead of "% full")

(from mtklein)
This CL is not editing public API.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/943453002
2015-02-19 06:32:12 -08:00
sugoi
f421ec6cc9 Fixing possible out of bound memory access
This was a bug found by ASAN. When width is very small, we can have something like width == 1 and rowBytes == 8. Using "2 * yWidth" (2) would be smaller than rowBytesY (8), so we could read memory out of bounds. This issue has a separate fix in blink (crbug.com/458861).

BUG=skia:

Review URL: https://codereview.chromium.org/936133003
2015-02-19 05:32:09 -08:00
bungeman
cd87c51de6 Remove FontConfigTypeface::getFamilyName().
This method is hiding a method of the same name from the superclass.
This is confusing and error prone, and doesn't really add anything.

Review URL: https://codereview.chromium.org/924333003
2015-02-18 13:22:26 -08:00
hcm
193b134655 managing chromes use section of docs
BUG=skia:

Review URL: https://codereview.chromium.org/934893003
2015-02-18 12:56:40 -08:00
hcm
606df7ad98 Runtime configuration section of docs
Preview here: http://skiadocs.com:8000/dev/runtime/?cl=940663002

BUG=skia:

Review URL: https://codereview.chromium.org/940663002
2015-02-18 12:55:04 -08:00
joshualitt
25d9c15408 Pass Rendertarget into context.
Adding Jim for text context stuff, and Steven for image blur stuff.

BUG=skia:

Review URL: https://codereview.chromium.org/939623005
2015-02-18 12:29:52 -08:00
jvanverth
5a105ff053 Use uint16s for texture coordinates when rendering text.
Allows us to push more vertices into a given vertex buffer, with
a slight performance improvement.

Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b

Review URL: https://codereview.chromium.org/917373002
2015-02-18 11:36:35 -08:00
bsalomon
0aa94798c9 Use SkAutoSTMalloc in GrResourceKey
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/935863003
2015-02-18 11:33:04 -08:00
halcanary
1b5c604d9d PDF: Add (low-memory) SkPDFBitmap class
Also: Add SkDeflateWStream and associated unit tests.

SkPDFBitmap is a replacement for SkPDFImage.  As of now, it only
supports 8888 bitmaps (the most common case).

SkPDFBitmap takes very little extra memory (aside from refing the
bitmap's pixels), and its emitObject() does not cache any data.

The SkPDFBitmap::Create function will check the canon for duplicates.
This can reduce the size of the output PDF.

Motivation:  this gives another ~40% decrease in PDF memory overhead

TODO: Support other ColorTypes and scrap SkPDFImage.

BUG=skia:3030

Review URL: https://codereview.chromium.org/918813002
2015-02-18 11:29:57 -08:00
bungeman
0babd3c619 Update DirectWrite streams to SkStreamAsset.
SkTypefaces now deal in terms of SkStreamAsset, but the DirectWrite port
was never fully converted.

Review URL: https://codereview.chromium.org/940563002
2015-02-18 11:01:06 -08:00
robertphillips
c119981aeb Remove Chromium staging in SkDrawCommand
This cannot land until https://codereview.chromium.org/917063008/ (Cleanup lingering scaffolding for Skia change) has landed.

TBR=joshualitt@chromium.org

Review URL: https://codereview.chromium.org/930973002
2015-02-18 10:56:05 -08:00
caryclark
88c748aeea update sampleapp for stroking experiment
Add RotateCircles3 back as better-named QuadStroker.

Switch pathfill test to call skia before draw instead of in
initializer to avoid triggering debugging breakpoints.

Review URL: https://codereview.chromium.org/912273003
2015-02-18 10:56:00 -08:00
dominik.rottsches
94886482ff Expose method to retrieve CTFont
BUG=skia:3351
R=bungeman@chromium.org

Review URL: https://codereview.chromium.org/872963003
2015-02-18 10:50:58 -08:00
kkinnunen
cd6ca9e689 Make SkImage::getTexture() const
Make SkImage::getTexture() const. At the moment the function
does not mutate the state.

One use-case is that this makes it possible in the future to add draw
function to SkBaseDevice functions. The device draw functions take
const ref objects, but SkGpuDevice likely would benefit of using the
getTexture().

BUG=skia:3388
R=reed@google.com

Review URL: https://codereview.chromium.org/925853002
2015-02-18 10:50:52 -08:00
mtklein
4c7a8b04a0 fix xcode build
NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/936033003
2015-02-18 09:35:49 -08:00
reed
e4ef1ca5be Revert of Use uint16s for texture coordinates when rendering text. (patchset #5 id:80001 of https://codereview.chromium.org/917373002/)
Reason for revert:
speculative revert for DEPS failures

https://codereview.chromium.org/932973002/

Original issue's description:
> Use uint16s for texture coordinates when rendering text.
>
> Allows us to push more vertices into a given vertex buffer, with
> a slight performance improvement.
>
> Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b

TBR=joshualitt@google.com,robertphillips@google.com,bsalomon@google.com,reed@google.com,djsollen@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/920333003
2015-02-17 18:38:38 -08:00
bsalomon
f320e04c50 Use an array of nonpurgeable resources in GrResourceCache
Review URL: https://codereview.chromium.org/932863004
2015-02-17 15:09:34 -08:00
halcanary
91d1d621de zlib/pdf: remove HaveFlate(), depend on preprocessor defines
Review URL: https://codereview.chromium.org/933523007
2015-02-17 14:43:06 -08:00
mtklein
82079fb7aa DM: move ext into key
BUG=skia:

Review URL: https://codereview.chromium.org/925523003
2015-02-17 13:18:04 -08:00
mtklein
1e4e814c03 SK_NO_FLATE
Also remove skia_zlib_static.  We're not using it.  We don't even have zlib in DEPS.

No public API changes.
TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/936583002
2015-02-17 13:10:43 -08:00
bsalomon
9f2d1571ed Make GrResourceCache use a priority queue of purgeable resources.
Review URL: https://codereview.chromium.org/921323002
2015-02-17 11:47:41 -08:00
reed
9e779d4951 add gm for path-arcs, and catch degenerate arc in conic-case
BUG=skia:3428

Review URL: https://codereview.chromium.org/931183002
2015-02-17 11:43:14 -08:00
egdaniel
305a8897cd Decrease number of allowed stages for Angle on GLProgramTest
BUG=skia:3435

Review URL: https://codereview.chromium.org/931783003
2015-02-17 11:18:38 -08:00
egdaniel
3ad6570e94 Use dst copies in porter duffer XP to correctly render certain blends.
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/997c6358d94e188b1a7b89a4f86e24cbe0f5a164

Review URL: https://codereview.chromium.org/914003003
2015-02-17 11:15:47 -08:00
mtklein
d603b22903 Suggested version with 'undo'.
BUG=skia:

Review URL: https://codereview.chromium.org/931483002
2015-02-17 11:13:33 -08:00
reed
f87fe78bc3 use common impl for drawTextOnPath
BUG=skia:

Review URL: https://codereview.chromium.org/925343003
2015-02-17 10:33:54 -08:00