Commit Graph

9787 Commits

Author SHA1 Message Date
commit-bot@chromium.org
866f4e34a9 optimize pathops coverage
Remove unused code from SkOpSegment.cpp and friends.
Add new tests exposed by coverage.
Fix a bug exposed by coverage -- removing the need to detect points that are nearby when intersecting.
Add gyp rule for building coverage flavor on Mac.

R=mtklein@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/75453003

git-svn-id: http://skia.googlecode.com/svn/trunk@12344 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 17:04:29 +00:00
commit-bot@chromium.org
8660783e19 Minor fix in Ganesh shader generation.
R=bsalomon@google.com

Author: skaslev@chromium.org

Review URL: https://codereview.chromium.org/78843006

git-svn-id: http://skia.googlecode.com/svn/trunk@12343 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 15:57:40 +00:00
commit-bot@chromium.org
22d39332bd Convert debugger settings controls to combo boxes.
This reduces the height of the settings panel significantly compared to
radio buttons.

With some luck, the debugger may now fit on non-4K monitors :)

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

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/78843005

git-svn-id: http://skia.googlecode.com/svn/trunk@12342 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 15:37:29 +00:00
halcanary@google.com
ad04eb49f5 Add SkImageGenerator Interface
-   Add SkDiscardablePixelRef class that uses SkDiscardableMemory and
    a SkImageGenerator.

-   Add SkDecodingImageGenerator class as an example of a
    SkImageGenerator.

-   Add DecodingImageGenerator unit test.

-   Add SkBasicDiscardableMemory implmentation for unit tests only.

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

Review URL: https://codereview.chromium.org/74793011

git-svn-id: http://skia.googlecode.com/svn/trunk@12341 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 15:32:08 +00:00
commit-bot@chromium.org
8b656c6db4 Avoid printing draw target info to stderr while running unit tests
Change draw target dump function to return a SkString. Clients can do
whatever they want with the string.

BUG=skia:1837
R=caryclark@google.com, bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/72353003

git-svn-id: http://skia.googlecode.com/svn/trunk@12340 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 15:23:15 +00:00
commit-bot@chromium.org
32f40ee8b0 Remove mutex around image decoding in skpdiff.
I removed the mutex to investigate BUG=skia:1803, and I get no
crashes. The crashes may have been related to other multithreading
issues.

Removing the mutex will allow skpdiff to run faster.

R=djsollen@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/61603008

git-svn-id: http://skia.googlecode.com/svn/trunk@12339 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 15:22:18 +00:00
commit-bot@chromium.org
75a2295445 Minor fixes for distance field fonts:
- Remove additional transform in drawpostext()
- Use bitmap fonts if rasterizer set in paint
- Correctly set scale ratio for drawtext()

R=bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/79283004

git-svn-id: http://skia.googlecode.com/svn/trunk@12338 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 15:09:33 +00:00
robertphillips@google.com
a4662865e3 More Windows 64b compilation warning fixes
https://codereview.chromium.org/47513017/



git-svn-id: http://skia.googlecode.com/svn/trunk@12337 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 14:24:16 +00:00
commit-bot@chromium.org
bcd431e177 Make the debugger left panel resizable.
Use QSplitters to allow resizing the left debugger panels.

R=robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/79573002

git-svn-id: http://skia.googlecode.com/svn/trunk@12336 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 13:41:37 +00:00
skia.committer@gmail.com
b2edfa8367 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@12335 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 07:02:36 +00:00
commit-bot@chromium.org
644629c1c7 Implement a benchmark for GrResourceCache
Adds "grresourcecache_add" and "grresourcecache_find" bench tests to test
GrResourceCache::add and GrResourceCache::find. The tests work only
with GPU backends, since GrResourceCache needs an GrGpu.

Modifies bench tests to override SkBenchmark::isSuitableFor(Backend)
function that specifies what kind of backend the test is inteded
for. This replaces the previous "fIsRendering" flag that would
indicate test that did no rendering.

Adds SkCanvas::getGrContext() call to get the GrContext that the
canvas ends up drawing to. The member function solves a common
use-case that is also used in the benchmark added here.

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

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/73643005

git-svn-id: http://skia.googlecode.com/svn/trunk@12334 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 06:21:58 +00:00
scroggo@google.com
bf6426120a Move PdfTokenLooper into its own file.
Otherwise, leave the class unchanged.

Review URL: https://codereview.chromium.org/79773002

git-svn-id: http://skia.googlecode.com/svn/trunk@12333 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 23:12:25 +00:00
scroggo@google.com
d1cf7696f5 Ifdef guard for SkPdfContext.
Review URL: https://codereview.chromium.org/79723002

git-svn-id: http://skia.googlecode.com/svn/trunk@12332 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 22:50:40 +00:00
bungeman@google.com
8f53d58622 Only SkFontMgr_New_DirectWrite should call GetSystemFontCollection.
Aside from the factory helper, there should be no calls to
IDWriteFactory::GetSystemFontCollection. All other code should work in
terms of IDWriteFontCollection for flexibility and correctness.

R=caryclark@google.com

Review URL: https://codereview.chromium.org/77023006

git-svn-id: http://skia.googlecode.com/svn/trunk@12331 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 22:42:13 +00:00
scroggo@google.com
d906702f78 Move SkPdfContext into its own files.
Otherwise, the class is unchanged.

Review URL: https://codereview.chromium.org/77763007

git-svn-id: http://skia.googlecode.com/svn/trunk@12330 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 22:33:39 +00:00
scroggo@google.com
b1de123336 Make changes based on talks with Edison.
Mostly FIXMEs, to go back and look at in more detail.

Fix a bug where ET did not set fTextBlock back to false.

Corresponds to notes in https://code.google.com/p/skia/source/detail?r=12270

git-svn-id: http://skia.googlecode.com/svn/trunk@12329 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 22:02:32 +00:00
scroggo@google.com
7d8013f306 Changes to SkTDStackNester.
SkTDStackNester is a class used by PdfViewer to assist in saving
and restoring the PDF state. Clean up and test this class.

Add some documentation.

Add FIXME's where I have questions to resolve.

Fix a bug where fNestingLevel was not initialized.

Remove a commented out line of code copied over from
SkTDStack.

Rename SkTDStackNester::nests() to nestingLevel() and make it const.

Remove unnecessary predeclaration and friend declaration.

Remove index() (both const and non-const versions). They were
unused, return something that may not be expected (index from
the top, rather than from the bottom), and don't work to get any
elements in earlier Recs once the first one is full.

Report a warning if the nesting level goes above the maximum level,
or if we attempt to bring it below zero.

Prevent fNestingLevel from dropping below zero.

Add kUnusedObject_SkPdfIssue, and use it where appropriate.

Depends on https://codereview.chromium.org/64093009/

R=mtklein@google.com

Review URL: https://codereview.chromium.org/68843006

git-svn-id: http://skia.googlecode.com/svn/trunk@12328 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 21:40:57 +00:00
commit-bot@chromium.org
178acd25b0 Fix SkMatrix44::invert(...) for identity matrices and a NULL parameter
Currently, to check if an SkMatrix44 is singular, we call ::invert(NULL) and
check the result. Usually this does no more work than is necessary. One
case where we do far too much work is if |this| is an identity matrix. In
this case, we do not early out and compute a (partial) determinant (we don't
do the full shebang because there are no perspective components).

BUG=None
R=ajuma@chromium.org, reed@google.com

Author: vollick@chromium.org

Review URL: https://codereview.chromium.org/79333002

git-svn-id: http://skia.googlecode.com/svn/trunk@12327 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 21:32:27 +00:00
commit-bot@chromium.org
6c4e71a5d6 Remove unnamed namespace usage from 'gm'.
Skia prefers static over unnamed namespaces.

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

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/79173002

git-svn-id: http://skia.googlecode.com/svn/trunk@12326 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 21:32:10 +00:00
scroggo@google.com
0daf00ccd7 Move SkTDStackNester into its own private file.
Also remove depth(), which is unused.

Otherwise the class is unchanged.

R=mtklein@google.com

Review URL: https://codereview.chromium.org/64093009

git-svn-id: http://skia.googlecode.com/svn/trunk@12324 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 20:47:21 +00:00
epoger@google.com
591469b1e9 rebaseline_server: clean up thread locks
followup to https://codereview.chromium.org/66803004/ ('rebaseline_server: improve thread locks to allow read access during updates')
(SkipBuildbotRuns)

R=jcgregorio@google.com

Review URL: https://codereview.chromium.org/64273011

git-svn-id: http://skia.googlecode.com/svn/trunk@12323 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 19:58:06 +00:00
mtklein@google.com
dad7070d91 More common_conditions simplifications.
BUG=
R=bungeman@google.com, djsollen@google.com

Review URL: https://codereview.chromium.org/78653002

git-svn-id: http://skia.googlecode.com/svn/trunk@12322 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 18:06:10 +00:00
mtklein@google.com
0724e1fc2d Hide unused gFormats.
Presumably this is WIP code?  Otherwise, we delete it?

BUG=
R=scroggo@google.com

Review URL: https://codereview.chromium.org/78503003

git-svn-id: http://skia.googlecode.com/svn/trunk@12321 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 18:02:00 +00:00
commit-bot@chromium.org
3495c9118d GpuTest::GetContext() doesn't exist.
BUG=
R=bsalomon@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/76143003

git-svn-id: http://skia.googlecode.com/svn/trunk@12320 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 17:59:54 +00:00
commit-bot@chromium.org
273104028c Remove the SKIA_IGNORE_GPU_MIPMAPS now that Chrome sets glGenMipmap for
the skia GL interface.

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

Author: skaslev@chromium.org

Review URL: https://codereview.chromium.org/74783011

git-svn-id: http://skia.googlecode.com/svn/trunk@12319 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 17:59:48 +00:00
mtklein@google.com
f41760939f Update expectations for Ubuntu x32 bot.
GM diffs are few, tiny, and unreproducable on our workstations.

BUG=

Review URL: https://codereview.chromium.org/78913002

git-svn-id: http://skia.googlecode.com/svn/trunk@12318 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 17:08:13 +00:00
scroggo@google.com
1ecd9cf379 Fix a warning building DM using ninja on Mac.
Here is the warning:
../../dm/DMTask.cpp: In copy constructor ‘DM::Task::Task(const DM::Task&)’:
../../dm/DMTask.cpp:17: warning: base class ‘class SkRunnable’ should be explicitly initialized in the copy constructor

Also add an SK_OVERRIDE.

R=mtklein@google.com

Review URL: https://codereview.chromium.org/76903002

git-svn-id: http://skia.googlecode.com/svn/trunk@12317 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 16:44:59 +00:00
robertphillips@google.com
8c99c9f4a6 Reverting r12315 (More Windows 64b compilation warning fixes) due to compilation failures
git-svn-id: http://skia.googlecode.com/svn/trunk@12316 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 15:56:14 +00:00
robertphillips@google.com
80051d38a3 More Windows 64b compilation warning fixes
https://codereview.chromium.org/47513017/



git-svn-id: http://skia.googlecode.com/svn/trunk@12315 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 15:46:10 +00:00
mtklein@google.com
f1077f9164 Add extra warnings to match what Android uses.
R=mtklein@google.com

Committed: https://code.google.com/p/skia/source/detail?r=12310

Review URL: https://codereview.chromium.org/74193005

git-svn-id: http://skia.googlecode.com/svn/trunk@12314 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 15:13:49 +00:00
bungeman@google.com
f7159bba8e De-generalize create_typeface on Windows.
The gdi and dw backends have a local create_typeface function.
This function is now called in only one place, onLegacyCreateTypeface.
Move the implementation into the caller.

R=caryclark@google.com

Review URL: https://codereview.chromium.org/76763002

git-svn-id: http://skia.googlecode.com/svn/trunk@12313 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 15:11:05 +00:00
mtklein@google.com
9615f8dbf1 Add missing (trivial) virtual destructors.
BUG=
R=scroggo@google.com

Review URL: https://codereview.chromium.org/78543002

git-svn-id: http://skia.googlecode.com/svn/trunk@12312 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 14:29:51 +00:00
scroggo@google.com
b60cdc8f4c Revert "Add extra warnings to match what Android uses."
This reverts commit d234662df1ffeb1bf45b2ade16c4acfb94f89450.

This change broke the build. Will resubmit after fixing warnings.

git-svn-id: http://skia.googlecode.com/svn/trunk@12311 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 13:58:58 +00:00
djsollen@google.com
692f88c7f0 Add extra warnings to match what Android uses.
R=mtklein@google.com

Review URL: https://codereview.chromium.org/74193005

git-svn-id: http://skia.googlecode.com/svn/trunk@12310 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 13:16:47 +00:00
djsollen@google.com
db490e9971 fix bench so that if SK_SUPPORTS_GPU even when not provided as compiler option
In the case that SK_SUPPORTS_GPU is not provided to the compiler the value is
eithe defined in in the SkUserConfig.h or SkPostConfig.h.  Prior to this change
those headers were not read prior to trying to include the GPU headers which
resulted in a failed compile.

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/76213004

git-svn-id: http://skia.googlecode.com/svn/trunk@12309 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 13:15:40 +00:00
bungeman@google.com
10822c6daa SkMemoryStream::setData should also set the current offset to 0.
R=scroggo@google.com

Review URL: https://codereview.chromium.org/73273004

git-svn-id: http://skia.googlecode.com/svn/trunk@12308 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-18 21:29:36 +00:00
commit-bot@chromium.org
c32ce49df8 Remove unused kMaxPOI.
BUG=
R=djsollen@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/62333026

git-svn-id: http://skia.googlecode.com/svn/trunk@12307 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-18 21:01:29 +00:00
mtklein@google.com
0f6dc21e32 Revert SK_REQUIRE_LOCAL_VAR changes for DEPS roll.
BUG=

Review URL: https://codereview.chromium.org/59703012

git-svn-id: http://skia.googlecode.com/svn/trunk@12306 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-18 20:55:29 +00:00
commit-bot@chromium.org
da4d7cfa58 Remove unnecessary includes.
R=djsollen@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/68893028

git-svn-id: http://skia.googlecode.com/svn/trunk@12304 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-18 17:27:16 +00:00
mtklein@google.com
cf4d0fb8bb Fix Windows build after the SkAutoFoo guard CL.
BUG=

Review URL: https://codereview.chromium.org/66593004

git-svn-id: http://skia.googlecode.com/svn/trunk@12303 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-18 16:33:08 +00:00
robertphillips@google.com
701b40543d Fix DocumentTest/SkDocument memory leaks
https://codereview.chromium.org/72833002/



git-svn-id: http://skia.googlecode.com/svn/trunk@12302 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-18 16:26:25 +00:00
commit-bot@chromium.org
e61a86cfa0 Guard against most unintentionally ephemeral SkAutoFoo instantiations.
I think I applied the trick everywhere possible.  Limitations:
    - can't be used with templated classes
    - all constructors and destructors must be defined inline

A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I
deleted them.  This change caught the same bugs Cary found in SkPath, plus one
more in SampleApp.

BUG=
R=reed@google.com, caryclark@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/72603005

git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-18 16:03:59 +00:00
commit-bot@chromium.org
8bf4c0ab7b Whitespace change to test CQ.
TBR=
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

Review URL: https://codereview.chromium.org/74723002

git-svn-id: http://skia.googlecode.com/svn/trunk@12300 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-17 16:19:11 +00:00
mike@reedtribe.org
139a2359ab fix general-pespective for conical gradient bug=1744
BUG=
R=edisonn@google.com

Review URL: https://codereview.chromium.org/71303003

git-svn-id: http://skia.googlecode.com/svn/trunk@12299 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 20:15:51 +00:00
jvanverth@google.com
7d4890c6f6 Ignore GM dashing_gpu on Debug ANGLE
BUG=Skia:1844

Committed: http://code.google.com/p/skia/source/detail?r=12297

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/72993002

git-svn-id: http://skia.googlecode.com/svn/trunk@12298 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 19:50:26 +00:00
commit-bot@chromium.org
d5c75bff3f Ignore GM dashing_gpu on Debug ANGLE
BUG=Skia:1844
R=robertphillips@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/72993002

git-svn-id: http://skia.googlecode.com/svn/trunk@12297 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 19:39:49 +00:00
scroggo@google.com
909228992c Pdfviewer refactoring.
Mostly superficial changes, to help me make sure I understand the
code while making modifications.

SkPdfRenderer:
First class I'm modifying. Move it into include/ and src/ directories.
Inherit from SkNoncopyable.
Replace load() with factory function which returns NULL if the load
fails.
Remove unload() and loaded(), which no longer make sense, since the
factory will return NULL on a failure to load, and unload() happens
on destruction.
Use a const char* for loading a PDF, following the convention of
SkStream::NewFromFile.
Remove unnecessary call to sqrt in SkPDFNativeRenderToBitmap.
Also in SkPDFNativeRenderToBitmap, use an appropriate SkScalar macro
to convert to an integer.
Use this-> when calling member functions.

pdf_viewer_main.cpp:
Call the new interface for SkPdfRenderer.

gyp files:
Refer to the new location of SkPdfRenderer.

R=edisonn@google.com

Review URL: https://codereview.chromium.org/59493011

git-svn-id: http://skia.googlecode.com/svn/trunk@12296 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 19:09:27 +00:00
commit-bot@chromium.org
be65a4c9d6 Add missing functions to SkNWayCanvas
R=reed@google.com
BUG=none

Author: enne@chromium.org

Review URL: https://codereview.chromium.org/65513003

git-svn-id: http://skia.googlecode.com/svn/trunk@12295 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 19:02:41 +00:00
robertphillips@google.com
9b9b04924f Remove suppression of blurrect_outer
git-svn-id: http://skia.googlecode.com/svn/trunk@12294 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 18:52:52 +00:00
robertphillips@google.com
5810420e55 rebaseline blurrect_outer images
https://codereview.chromium.org/70103015/



git-svn-id: http://skia.googlecode.com/svn/trunk@12293 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 18:45:13 +00:00