Commit Graph

369 Commits

Author SHA1 Message Date
commit-bot@chromium.org
ef57b7e653 DM: make GPU tasks multithreaded again. Big refactor.
The main meat of things is in SkThreadPool.  We can now give SkThreadPool a
type for each thread to create and destroy on its local stack.  It's TLS
without going through SkTLS.

I've split the DM tasks into CpuTasks that run on threads with no TLS, and
GpuTasks that run on threads with a thread local GrContextFactory.

The old CpuTask and GpuTask have been renamed to CpuGMTask and GpuGMTask.

Upshot: default run of out/Debug/dm goes from ~45 seconds to ~20 seconds.

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

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13632 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-28 20:31:31 +00:00
robertphillips@google.com
8f90a892c5 add new onClip* methods to SkCanvas
https://codereview.chromium.org/183453002/



git-svn-id: http://skia.googlecode.com/svn/trunk@13627 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-28 18:19:39 +00:00
robertphillips@google.com
03fc3b4f67 Revert of r13620 (add new onClip* methods to SkCanvas - https://codereview.chromium.org/183453002/) due to broken Chrome Canary and failing tests.
git-svn-id: http://skia.googlecode.com/svn/trunk@13622 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-28 15:28:02 +00:00
robertphillips@google.com
392c9be344 add new onClip* methods to SkCanvas
https://codereview.chromium.org/183453002/



git-svn-id: http://skia.googlecode.com/svn/trunk@13620 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-28 14:35:45 +00:00
commit-bot@chromium.org
210ae2a426 Culling API
*** SKP format breaking change ***

Adding a couple of culling primitives: pushCull(SkRect) & popCull().

These are currently only plumbed for SKP playback quickreject.

At record time, we perform a couple of optimizations to trim down the
number of redundant culls:

  * collapse empty pushCull/popCull pairs
  * skip pushCull/popCull pairs nested within an identical cull rect

Things still missing/to consider:

  * use an inlineable, simplified quickreject (Mike's old prototype)
  * debugger visualization for cull boxes
  * BBH integration: the initial prototype had some minimal BBH support,
    but since the optimizations required expensive rewinds and culling
    is expected to be a BBH alternative, it got dropped.

R=bsalomon@google.com, reed@google.com, robertphillips@google.com, caryclark@google.com, tomhudson@google.com, iancottrell@google.com

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13611 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-27 17:40:13 +00:00
bsalomon@google.com
4ebe382188 Revert "Revert of Add getReducedClipStack to lua canvas (https://codereview.chromium.org/180283004/)"
This reverts commit efded03a38d6147caaf2d951638d27fdd47eed64.

Fixes builds

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13599 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-26 20:22:32 +00:00
commit-bot@chromium.org
1caedbb216 Revert of Add getReducedClipStack to lua canvas (https://codereview.chromium.org/180283004/)
Reason for revert:
breaking a bunch of builds

Original issue's description:
> Add getReducedClipStack to lua canvas
>
> Committed: http://code.google.com/p/skia/source/detail?r=13594

R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13597 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-26 18:32:44 +00:00
commit-bot@chromium.org
a47ac2bcc2 Add getReducedClipStack to lua canvas
R=reed@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13594 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-26 17:50:08 +00:00
commit-bot@chromium.org
5cc25359c6 Add getClipStack method to lua SkCanvas
R=reed@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13567 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-24 18:59:48 +00:00
commit-bot@chromium.org
ab5827354e override new virtual onDrawDRRect in util canvas subclasses
BUG=skia:
R=robertphillips@google.com, reed@google.com

Author: reed@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13529 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-21 12:20:45 +00:00
reed@google.com
28183b4043 remove (unused by chrome) SkDeferredCanvas(device) factory signature
BUG=skia:
R=junov@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13302 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 15:34:10 +00:00
commit-bot@chromium.org
2859f9fbf3 rename tracing parameter to be more consistent with other methods
BUG=skia:
R=bsalomon@google.com

Author: humper@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13287 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-03 19:47:13 +00:00
commit-bot@chromium.org
3458a1736f clean up a couple of parameters in the tracing interface
BUG=skia:
R=bsalomon@google.com

Author: humper@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13283 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-03 18:09:32 +00:00
commit-bot@chromium.org
bf6a6d4504 fix leaks in SkConf
These leaks were small and would only happen with non-default
runtime configuration things set, but they were still leaks
and they should be squished.

Valgrind reported leaks pre-patch, and all the rtconf leaks are gone after patch.

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

Author: humper@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13269 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-31 17:32:03 +00:00
skia.committer@gmail.com
4c18e9fbb6 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@13258 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-31 03:01:59 +00:00
commit-bot@chromium.org
6169f2b4da initial import of Chrome's trace_event into skia framework
This patch includes a modified version of Chrome's trace_event.h, which provides
tracing macros that can easily integrate into the about://tracing framework.

Currently the macros link to a default implementation of the (narrow) tracing
class SkDefaultEventTracer which does nothing; next step will be to have Chrome
subclass the SkEventTracer with a shim that bolts Skia's trace events to its own,
allowing Skia's trace events to show up in about://tracing.

I've verified that this file builds properly, and when I added a simple scoped
TRACE_EVENT0 to SkCanvas::drawRect, along with some debug prints in the NOP
implementation of tracing, I saw what I expected printed to the screen.

BUG=skia:
R=nduca@chromium.org, reed@google.com, mtklein@google.com, bsalomon@google.com

Author: humper@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13256 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-31 00:04:25 +00:00
commit-bot@chromium.org
8b0e8ac5f5 Refactor read and write buffers.
Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer
a step each in the hierarchy.

What used to be this:

SkFlattenableWriteBuffer -> SkOrderedWriteBuffer
SkFlattenableReadBuffer  -> SkOrderedReadBuffer
SkFlattenableReadBuffer  -> SkValidatingReadBuffer

is now

SkWriteBuffer
SkReadBuffer -> SkValidatingReadBuffer

Benefits:
  - code is simpler, names are less wordy
  - the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed
  - write buffers are completely devirtualized, important for record speed

This refactoring was mostly mechanical.  You aren't going to find anything
interesting in files with less than 10 lines changed.

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

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-30 18:58:24 +00:00
mike@reedtribe.org
d173b87608 remove SkScalarMul macro
git-svn-id: http://skia.googlecode.com/svn/trunk@13145 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-23 02:02:45 +00:00
robertphillips@google.com
56bf6e4bce Pull in Chromium's version of GatherPixelRefs
https://codereview.chromium.org/134473002/



git-svn-id: http://skia.googlecode.com/svn/trunk@13038 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 13:33:26 +00:00
reed@google.com
f3abaeb0c5 remove (now unused) Sk64 -- just use int64_t
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13032 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-10 22:05:41 +00:00
halcanary@google.com
2d1adf2322 Reduce verbosity of SkGraphics::Init in default case.
SkGraphics::Init() now checks to see if there are any non-default
runtime configuration options before announcing that it is about
to print out the non-default runtime configuration options.

This makes the executables in tools/ less verbose.

Add SkRTConfRegistry::countNonDefault() function.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13017 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-10 15:00:45 +00:00
skia.committer@gmail.com
f5e1f63461 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@12849 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-31 07:01:36 +00:00
reed@google.com
57212f9469 Revert "Revert of https://codereview.chromium.org/113823003/"
This reverts commit 68b4b32066ea0ba9dbb5d326a836f8a54297b7aa.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12842 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-30 14:40:38 +00:00
commit-bot@chromium.org
4ad4ae907f Revert of https://codereview.chromium.org/113823003/
Reason for revert: need to update callsites in linux codecs

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

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12841 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-30 14:24:37 +00:00
reed@google.com
a306d93cd7 remove Sk64 from public API, and start to remove usage internally
BUG=
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12840 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-30 14:14:42 +00:00
reed@google.com
01c41a556e Revert "Revert "begin to remove SkLONGLONG and wean Skia off of Sk64""
This reverts commit 15b986baf026a3da5e2cac8106a1b753df242c39.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12796 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-20 14:24:21 +00:00
reed@google.com
b1560445c6 Revert "begin to remove SkLONGLONG and wean Skia off of Sk64"
This reverts commit 784890196fdab96289f9389db43aca01f35db0f9.

Revert "use LL suffix for 64bit literal"

This reverts commit 9634295aff9bffd7a3875a0ca4a9b1a27d0793fc.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12790 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-19 22:28:48 +00:00
reed@google.com
d6a301e9ad begin to remove SkLONGLONG and wean Skia off of Sk64
BUG=
R=caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12788 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-19 21:54:27 +00:00
reed@google.com
1915fd09f3 remove unused SkFixed and SkFract functions
BUG=
R=caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12767 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-19 14:22:03 +00:00
reed@google.com
8f4d2306fa remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats
To keep the CL (slightly) managable, this does not make any changes to
existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this
time around.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-17 16:44:46 +00:00
commit-bot@chromium.org
e3bb3bce3e Add JSON output option to bench.
A new command-line flag --outResultsFile takes the filename to write the JSON into.

The human readable output is the same as before with one exception. Previously DEBUG would be printed if in debug mode, or nothing would be printed if in release mode. Now this is reported as a named option:

  build=DEBUG

or

  build=RELEASE

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

Author: jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12465 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-03 18:16:48 +00:00
bungeman@google.com
0d9e3da8bb Use lowercase windows.h in includes to fix Windows cross compilation using mingw.
While it doesn't matter on Windows, mingw on case-sensitive OSes uses all lower case filenames for platform include files. I found the problem in SkCondVar.h from Mozilla checkout of skia sources, but the patch contains a fix for the whole skia tree.

R=bungeman@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12461 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-03 15:23:37 +00:00
commit-bot@chromium.org
eddb02c82d Adding SkDeferredCanvas::NoticifationClient to the exported API.
R=reed@android.com, robertphillips@google.com, reed, robertphillips
BUG=1861

Author: schenney@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12380 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-25 15:44:37 +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
scroggo@google.com
09a5383adc Hide implementation details: SkFrontBufferedStream
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12256 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-12 20:53:05 +00:00
halcanary@google.com
1f0121af49 New SkRTConf macro SK_CONF_TRY_SET: no complaint on missing configuration
SK_CONF_TRY_SET() is like SK_CONF_SET(), but doesn't complain if
confname can't be found.  This is useful if the SK_CONF_DECLARE is
inside a source file whose linkage is dependent on the system.

Internally to the SkRTConf system, SkRTConfRegistry::set() was given
an additional parameter controling wanrings.

A new RuntimeConfig unit test was introduced.  It should run silently.
In the future, it should be expanded to cover all of the SkRTConf
functionality.

(For example, the images.jpeg.suppressDecoderWarnings variable is
defined and used only in SkImageDecoder_libjpeg.cpp, but on MacOS, we
use Core Graphics via SkImageDecoder_CG.cpp - SkImageDecoder_libjpeg
is never linked in.  The same is true of the Windows Imaging Component
on Windows.)

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12155 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-06 15:07:44 +00:00
reed@google.com
4469938e92 Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning""
This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 17:28:30 +00:00
reed@google.com
6fcbfcead5 Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"
This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497.

git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 16:31:11 +00:00
reed@google.com
081560e3ab add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning
BUG=
R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 16:24:08 +00:00
bsalomon@google.com
7ce564cccb Revert "If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance."
This reverts commit r11904

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11909 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 16:54:15 +00:00
bsalomon@google.com
ad254fee73 If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance.
Committed: http://code.google.com/p/skia/source/detail?r=11842

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11904 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 13:19:12 +00:00
commit-bot@chromium.org
6ee68583f8 SkThreadPool: allow for Runnables that add other Runnables to the pool.
There's a scenario that we're currently not allowing for, but I'd really like to use in DM:

1) client calls add(SomeRunnable*) several times
2) client calls wait()
3) any of the runnables added by the client _themselves_ call add(SomeOtherRunnable*)
4-inf) maybe those SomeOtherRunnables too call add(SomeCrazyThirdRunnable*), etc.

Right now in this scenario we'll assert in debug mode in step 3) when we call
add() and we're waiting to stop, and do strange unspecified things in release
mode.

The old threadpool had basically two states: running, and waiting to stop.  If
a thread saw we were waiting to stop and the queue was empty, that thread shut
down.  This wasn't accounting for any work that other threads might be doing;
potentially they were about to add to the queue.

So now we have three states: running, waiting, and halting.  When the client
calls wait() (or the destructor triggers), we move into waiting.  When a thread
notices we're _really_ done, that is, have an empty queue and there are no
active threads, we move into halting.  The halting state actually triggers the
threads to stop, which wait() is patiently join()ing on.

BUG=
R=bungeman@google.com, bsalomon@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11852 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-18 14:19:19 +00:00
robertphillips@google.com
c2cc1dbe81 Revert r11842 (call drawRect to try GrAARectRenderer if the path is a rect - https://codereview.chromium.org/23484007) due to changes to the following GM images:
inverse_paths
pathopsinverse




git-svn-id: http://skia.googlecode.com/svn/trunk@11845 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-17 17:34:20 +00:00
commit-bot@chromium.org
521a46750d If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance.
R=bsalomon@google.com, robertphillips@google.com, reed@google.com

Author: yunchao.he@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11842 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-17 16:29:21 +00:00
skia.committer@gmail.com
fbc58a3055 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11769 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-15 07:02:27 +00:00
robertphillips@google.com
adacc7067a Start cleaning up 64bit Win warnings
https://codereview.chromium.org/27192003/



git-svn-id: http://skia.googlecode.com/svn/trunk@11764 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-14 21:53:24 +00:00
humper@google.com
bdecb68a2b handle configuration variables longer than 30 characters long
BUG=
R=bsalomon@google.com, halcanary@google.com, reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11757 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-14 16:27:30 +00:00
commit-bot@chromium.org
a7538baeae SkThreadPool: tweak two little things that have been annoying me
1) it's pretty annoying that SkThreadPool doesn't include SkRunnable for us;
 2) add wait() so we don't have to keep using SkAutoTDelete/free() to wait for completion.

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

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11711 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 18:49:04 +00:00
bungeman@google.com
27f74aab32 Improve SkScalerContext_GDI::generateCharToGlyph for non-BMP code points.
Sometimes, when ScriptShape is presented with a surrogate pair which does
not map to a glyph, it returns two space glyphs instead of .notdef (0).
Detect this class of issues and handle appropriately.



git-svn-id: http://skia.googlecode.com/svn/trunk@11660 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-08 21:32:15 +00:00
commit-bot@chromium.org
722555bebb Add perspective support to SkMatrix44 initializers.
I noticed SkMatrix <-> SkMatrix44 conversions were dropping the
perspective values on the floor.  As we use SkMatrix44 heavily in
Chromium, I'm concerned this missing code will cause a bug eventually.
It should be correct to simply use the bottom row of the 4x4 matrix
excluding the third column.

Previously committed and reverted, second attempt with fix for
incorrect use of SkMScalar/SkScalar.

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

Author: aelias@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11624 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-05 01:16:30 +00:00
aelias@chromium.org
851af07b11 Revert "Add perspective support to SkMatrix44 initializers."
This reverts commit 93db1bcae0863feed8d00a61ae2cf72a90a0083c.

git-svn-id: http://skia.googlecode.com/svn/trunk@11623 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-04 22:26:28 +00:00
commit-bot@chromium.org
761f860a42 Add perspective support to SkMatrix44 initializers.
I noticed SkMatrix <-> SkMatrix44 conversions were dropping the
perspective values on the floor.  As we use SkMatrix44 heavily in
Chromium, I'm concerned this missing code will cause a bug eventually.
It should be correct to simply use the bottom row of the 4x4 matrix
excluding the third column.

BUG=
R=reed@google.com

Author: aelias@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11622 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-04 20:38:08 +00:00
commit-bot@chromium.org
edf2367346 Fix race between ~SkThreadPool and SkThreadPool::Loop on fDone.
We're writing fDone without holding the mutex.  Bad form, says tsan.

In practice this is fairly innocuous, as fDone only ever goes from false to
true and only once.  Though, I wouldn't be surprised if there were some way
this could leak a thread that never got the signal to die.

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

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11563 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-01 18:44:18 +00:00
scroggo@google.com
83fd2c7c43 Add a buffered SkStream class.
This is used by Android to buffer an input stream which may not
otherwise be able to rewind.

Add a test for the new class.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11488 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 21:35:39 +00:00
commit-bot@chromium.org
e2419cc5ed Add getFloat/setFloat funcs to SkMatrix44
These match the existing getDouble/setDouble functions.

R=reed@google.com, tomhudson@chromium.org

Author: enne@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23757031

git-svn-id: http://skia.googlecode.com/svn/trunk@11355 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-18 18:52:09 +00:00
commit-bot@chromium.org
e0e7cfe44b Change old PRG to be SkLCGRandom; change new one to SkRandom
The goal here is to get people to start using the new random number
generator, while leaving the old one in place so we don't have to 
rebaseline GMs.

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

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/23576015

git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-09 20:09:12 +00:00
commit-bot@chromium.org
040fd8f567 Rip out CSAA support
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/23882009

git-svn-id: http://skia.googlecode.com/svn/trunk@11138 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-06 20:00:41 +00:00
djsollen@google.com
339e79fbea Add SkCanvasStack and update the Canvas utilities to use it.
BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11081 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 17:16:00 +00:00
commit-bot@chromium.org
e029440758 Replace SkTScopedPtr with SkAutoTDelete in Skia.
BUG=
R=djsollen@google.com, reed@google.com, vandebo@chromium.org

Author: mtklein@google.com

Review URL: https://chromiumcodereview.appspot.com/23621005

git-svn-id: http://skia.googlecode.com/svn/trunk@11016 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-29 22:14:04 +00:00
djsollen@google.com
5587ac09be Create a semi-stable API for capturing the state of an SkCanvas and reconstructing that state across different versions of Skia.
R=joth@chromium.org, mtklein@google.com, reed@google.com, scroggo@google.com

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11013 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-29 20:20:40 +00:00
djsollen@google.com
16b86ced1f Revert "Create a semi-stable API for capturing the state of an SkCanvas and reconstructing that state across different versions of Skia."
This reverts r11010.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11011 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-29 19:41:56 +00:00
djsollen@google.com
2ce9fce145 Create a semi-stable API for capturing the state of an SkCanvas and reconstructing that state across different versions of Skia.
R=joth@chromium.org, mtklein@google.com, reed@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11010 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-29 19:29:09 +00:00
robertphillips@google.com
1f2f338e23 Split SkDevice into SkBaseDevice and SkBitmapDevice
https://codereview.chromium.org/22978012/



git-svn-id: http://skia.googlecode.com/svn/trunk@10995 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-29 11:54:56 +00:00
robertphillips@google.com
9b051a375b Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready.
git-svn-id: http://skia.googlecode.com/svn/trunk@10835 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-20 20:06:40 +00:00
robertphillips@google.com
3055b70018 Split SkDevice out of SkBitmapDevice
https://codereview.chromium.org/22978012/



git-svn-id: http://skia.googlecode.com/svn/trunk@10830 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-20 17:49:04 +00:00
bungeman@google.com
ffe95f5414 Fix size_t to int conversion warning on Win64 in SkRTConf.h.
Review URL: https://codereview.chromium.org/23213004

git-svn-id: http://skia.googlecode.com/svn/trunk@10800 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-19 20:05:38 +00:00
commit-bot@chromium.org
eed779d866 This CL plumbs in the drawBitmapRectToRect "bleed" flag and makes it live on the simplest GPU path.
R=bsalomon@google.com, reed@google.com, edisonn@google.com, scroggo@google.com, jvanverth@google.com, mtklein@google.com

Author: robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/20806003

git-svn-id: http://skia.googlecode.com/svn/trunk@10765 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-16 10:24:37 +00:00
commit-bot@chromium.org
c1bf2de835 Fix crash when querying a runtime config that is defined in environment
Fix crash when querying a runtime config in case when there's no
skia.conf file and the config variable is still defined in the
environment.

Runs the added SkRTConf::UnitTest test as part of new "UnitTest" test.

Previous version of the patch failed Windows build due to setenv usage.
On Windows, use _putenv_s instead.

BUG=skia:1494
R=bsalomon@google.com, humper@google.com

Author: kkinnunen@nvidia.com

Review URL: https://chromiumcodereview.appspot.com/23174002

git-svn-id: http://skia.googlecode.com/svn/trunk@10715 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-14 18:14:37 +00:00
robertphillips@google.com
1c0ade7fc6 Reverted r10654 (Fix crash when querying a runtime config that is defined in environment) due to compilation failure on Chromium win_layout bot
git-svn-id: http://skia.googlecode.com/svn/trunk@10669 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-11 13:20:18 +00:00
commit-bot@chromium.org
cb62224996 Removing deprecated constructors and setDevice from SkDeferredCanvas
R=senorblanco@google.com, senorblanco@chromium.org
BUR=crbug.com/270143

Author: junov@chromium.org

Review URL: https://chromiumcodereview.appspot.com/22385011

git-svn-id: http://skia.googlecode.com/svn/trunk@10657 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-09 14:24:59 +00:00
commit-bot@chromium.org
a1007def7e Fix crash when querying a runtime config that is defined in environment
Fix crash when querying a runtime config in case when there's no
skia.conf file and the config variable is still defined in the
environment.

Runs the added SkRTConf::UnitTest test as part of new "UnitTest" test.

BUG=skia:1494
R=bsalomon@google.com, humper@google.com

Author: kkinnunen@nvidia.com

Review URL: https://chromiumcodereview.appspot.com/22650007

git-svn-id: http://skia.googlecode.com/svn/trunk@10654 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-09 13:23:56 +00:00
commit-bot@chromium.org
14cec91fe1 Add SkNWayCanvas comment API overrides.
SkNWayCanvas should also dispatch beginCommentGroup(), addComment() & endCommentGroup.

R=robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://chromiumcodereview.appspot.com/19723012

git-svn-id: http://skia.googlecode.com/svn/trunk@10224 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-20 15:03:26 +00:00
commit-bot@chromium.org
e1a81d2e22 Export SkProxyCanvas and SkNWayCanvas for external use.
R=robertphillips@google.com, fmalita@google.com

Author: fmalita@chromium.org

Review URL: https://chromiumcodereview.appspot.com/19240008

git-svn-id: http://skia.googlecode.com/svn/trunk@10095 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 22:49:37 +00:00
humper@google.com
807863839f avoid introducing duplicate const in release builds
git-svn-id: http://skia.googlecode.com/svn/trunk@9945 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 21:55:47 +00:00
commit-bot@chromium.org
d43f644912 Animated the PathUtils Sample to show path contours# Enter a description of the change.
Animated the PathUtils Sample to path contours

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

Author: dierk@google.com

Review URL: https://chromiumcodereview.appspot.com/18552005

git-svn-id: http://skia.googlecode.com/svn/trunk@9934 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 16:30:38 +00:00
tfarina@chromium.org
293f01939c Fix header guard typos.
This is preventing compilation on Linux with clang.

R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9905 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-08 13:00:42 +00:00
commit-bot@chromium.org
064779aa18 Adding my Bitmap2Path sample for 1on1 meeting.
BUG=
R=reed@google.com, borenet@google.com

Author: dierk@google.com

Review URL: https://chromiumcodereview.appspot.com/16829003

git-svn-id: http://skia.googlecode.com/svn/trunk@9843 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-01 17:50:29 +00:00
reed@google.com
e3823fd901 add script to scrape glyph usage in drawText calls
git-svn-id: http://skia.googlecode.com/svn/trunk@9353 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-30 18:55:14 +00:00
robertphillips@google.com
0a4805e33f First pass at Comment API
https://codereview.chromium.org/13957009/



git-svn-id: http://skia.googlecode.com/svn/trunk@9310 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 13:24:23 +00:00
junov@chromium.org
66070a527c Changing SkDeferredCanvas to use factories for creation
The objective of this change is to remove all calls to 
SkCanvas::setDevice. The factory API is hidden behind
a build flag in order to ease the roll into chromium.

A side-effect of the factory pattern is that it will
no longer be possible to allocate a SkDeferredCanvas on
the stack.  This changes nothing for chrome, but it
impacts skia test programs.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9298 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 17:39:08 +00:00
junov@chromium.org
7070f76b90 Adding setSurface public API method to SkDeferredCanvas
The purpose of this change is to provide an API that Blink 2D canvas layers can use
to install a new render target when recovering from a lost graphics context.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9276 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-24 17:13:00 +00:00
skia.committer@gmail.com
2d816ad36e Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9252 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-23 07:01:22 +00:00
reed@google.com
3597b73bc6 expand SkLua to handle creation of its own State
add lua sample

BUG=
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9247 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 20:12:50 +00:00
reed@google.com
74ce6f046c add dumpops.lua as a sample scraper that just dumps the arguments
add SkLua.h for common utilities

BUG=
R=rmistry@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9242 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 15:13:18 +00:00
mike@reedtribe.org
f02fe3d4fe support SkCanvas as a real lua object
git-svn-id: http://skia.googlecode.com/svn/trunk@9208 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 12:20:39 +00:00
skia.committer@gmail.com
539f364e80 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9159 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-16 07:01:00 +00:00
reed@google.com
dff7e11c20 add SkLuaCanvas
add lua 5.2 to third_party

BUG=
R=bungeman@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9149 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-15 19:34:20 +00:00
bungeman@google.com
4bbc524ca4 TTC support for DirectWrite.
https://codereview.chromium.org/14600009/


git-svn-id: http://skia.googlecode.com/svn/trunk@8958 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-02 14:01:36 +00:00
bungeman@google.com
7103344b64 Add FontMgr to DirectWrite.
https://codereview.chromium.org/14314008/


git-svn-id: http://skia.googlecode.com/svn/trunk@8934 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-01 14:21:20 +00:00
commit-bot@chromium.org
44c661ff15 Add thread-per-core setting to SkThreadPool.
BUG=
R=scroggo@google.com, caryclark@google.com

Author: mtklein@google.com

Review URL: https://chromiumcodereview.appspot.com/13855009

git-svn-id: http://skia.googlecode.com/svn/trunk@8802 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-22 15:23:14 +00:00
junov@chromium.org
5ee449af74 Fixing viral copy/paste typo Shapshot -> Snapshot
Unreviewed

git-svn-id: http://skia.googlecode.com/svn/trunk@8667 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-12 20:20:50 +00:00
junov@chromium.org
67d7422844 Adding SkSurface support to SkDeferredCanvas
Review URL: https://codereview.chromium.org/14178002

git-svn-id: http://skia.googlecode.com/svn/trunk@8648 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-12 13:33:01 +00:00
reed@google.com
50b14a26dc oops, fix name for SkCreateDataProviderFromData
git-svn-id: http://skia.googlecode.com/svn/trunk@8375 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 20:21:26 +00:00
reed@google.com
12b1f19c1f expose skdata -> cgdataprovider helper
git-svn-id: http://skia.googlecode.com/svn/trunk@8374 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 20:15:40 +00:00
bsalomon@google.com
b7f20f20ac Unify wgl context creation.
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/12455009

git-svn-id: http://skia.googlecode.com/svn/trunk@7990 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-05 19:13:09 +00:00
skia.committer@gmail.com
044679ef8c Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7746 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-15 07:16:57 +00:00
humper@google.com
5d0a7692da debug dump functions for mathematica visualization
BUG=

Review URL: https://codereview.appspot.com/7322078

git-svn-id: http://skia.googlecode.com/svn/trunk@7743 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-14 18:57:59 +00:00
robertphillips@google.com
5990397d08 Address google3 compiler warning
https://codereview.appspot.com/7308063/



git-svn-id: http://skia.googlecode.com/svn/trunk@7655 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 21:02:23 +00:00
bsalomon@google.com
753a362cfc Use SkBits2Float in SkRandom
https://codereview.appspot.com/7266044/



git-svn-id: http://skia.googlecode.com/svn/trunk@7648 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 19:52:30 +00:00
djsollen@google.com
efbe8e9bed Fix errors when compiling with -Wall -Werror on Android.
This CL also turns those features on by default on Android

Review URL: https://codereview.appspot.com/7313049

git-svn-id: http://skia.googlecode.com/svn/trunk@7645 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 18:58:35 +00:00
reed@google.com
3fda0eadac check for self-assignment in operator=
git-svn-id: http://skia.googlecode.com/svn/trunk@7610 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-06 12:47:14 +00:00
skia.committer@gmail.com
24d5ee4f88 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7484 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-31 07:06:15 +00:00
jvanverth@google.com
a8e66f76d9 Adds SkMWCRandom, which generates random numbers using a variant of George Marsaglia's multiply-with-carry "mother-of-all" method. This passes the tuftests suite so it should be much better than the current method (which does not).
https://codereview.appspot.com/7235056/


git-svn-id: http://skia.googlecode.com/svn/trunk@7463 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-30 15:42:19 +00:00
skia.committer@gmail.com
e16efc1882 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-26 07:06:02 +00:00
bsalomon@google.com
6d5d08f14f Fix nextRangeU(0, MAX_UINT) div by zero.
R=reed@google.com
Review URL: https://codereview.appspot.com/7201058

git-svn-id: http://skia.googlecode.com/svn/trunk@7400 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-25 19:19:20 +00:00
bsalomon@google.com
3bc7200240 Move random from core to utils
Review URL: https://codereview.appspot.com/7193064

git-svn-id: http://skia.googlecode.com/svn/trunk@7395 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-25 17:49:03 +00:00
tomhudson@google.com
7cfb9c7b61 Revert r7241, which broke tests on most platforms.
git-svn-id: http://skia.googlecode.com/svn/trunk@7245 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-17 13:29:35 +00:00
tomhudson@google.com
21e4322b92 Add SSE2 multiplication for SkMatrix44 on some platforms.
Original author whunt@chromium.org.
https://codereview.appspot.com/7058077/



git-svn-id: http://skia.googlecode.com/svn/trunk@7241 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-17 12:17:00 +00:00
reed@google.com
edb7713cd5 mark default constructor for SkMatrix44 as deprecated, since it calls setIdentity()
and we have explicit (enum-based) constructors to distinguish that from uninitialized.



git-svn-id: http://skia.googlecode.com/svn/trunk@7228 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-16 16:28:58 +00:00
robertphillips@google.com
76f9e938df Added print out of SkShader information to debugger
https://codereview.appspot.com/7105045/



git-svn-id: http://skia.googlecode.com/svn/trunk@7201 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-15 20:17:47 +00:00
reed@google.com
d53025364a To support alignment pragmas (for speed), we need to relax assumptions about
our sizeof. So rewrite operator= and copy-constructor to just copy individual
fields.
Review URL: https://codereview.appspot.com/7098063

git-svn-id: http://skia.googlecode.com/svn/trunk@7181 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-15 14:54:00 +00:00
skia.committer@gmail.com
fb830981f2 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7176 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-15 12:19:31 +00:00
humper@google.com
9b64cac7c8 fix warning on linux
BUG=

Review URL: https://codereview.appspot.com/7101058

git-svn-id: http://skia.googlecode.com/svn/trunk@7174 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-15 03:03:38 +00:00
skia.committer@gmail.com
7fc0e0a75a Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7173 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-15 02:01:40 +00:00
humper@google.com
810ae48f82 move template specializations to inline functions in the header to make windows happy again
BUG=

Review URL: https://codereview.appspot.com/7099053

git-svn-id: http://skia.googlecode.com/svn/trunk@7164 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-14 20:11:00 +00:00
humper@google.com
6d29eda491 remove dynamic_cast because rtti is disabled on some platforms (but not all??)
BUG=

Review URL: https://codereview.appspot.com/7102056

git-svn-id: http://skia.googlecode.com/svn/trunk@7161 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-14 19:20:28 +00:00
humper@google.com
7af56bee17 Runtime configuration system for skia. This will allow developers to control settings at launch time without relying on compile-time flags or recompilation. It can be used to turn features on and off, as well as to control numeric quantities to 'tune' algorithms. Once I make sure it's working across all platforms I'll send out a quick tutorial on its use.
Review URL: https://codereview.appspot.com/7098051

git-svn-id: http://skia.googlecode.com/svn/trunk@7158 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-14 18:49:19 +00:00
reed@google.com
4ed0fb7684 revert 6766, thereby re-landing 6762-6763 now that the bots are ready
git-svn-id: http://skia.googlecode.com/svn/trunk@6770 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-12 20:48:18 +00:00
reed@google.com
25c1408c3d revert 6762-6763, since those require new skps to be generated, and we can't
do that immediately right now... will re-submit when we can.



git-svn-id: http://skia.googlecode.com/svn/trunk@6766 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-12 19:15:31 +00:00
reed@google.com
68d61ed83e make RRect and Oval first-class drawing primitives in SkCanvas.
add RRect as a first-class clip primitive.
Review URL: https://codereview.appspot.com/6923058

git-svn-id: http://skia.googlecode.com/svn/trunk@6762 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-12 19:02:53 +00:00
vollick@chromium.org
57a54e33cf Add SkMatrix44 constructor that allows user to control the initialization
method.  Preliminary results using Chromium's cc_perftests
show that we can avoid almost half of the default constructors from
redundantly/unnecessarily initializing the matrix to identity.

Review URL: https://codereview.appspot.com/6872056

git-svn-id: http://skia.googlecode.com/svn/trunk@6742 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 20:16:10 +00:00
mike@reedtribe.org
f8b1ebc35b add helpers for isTranslate and isScaleTranslate
special-case determinant for isScaleTranslate



git-svn-id: http://skia.googlecode.com/svn/trunk@6725 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 03:27:47 +00:00
skia.committer@gmail.com
0264fb4543 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6687 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 02:01:25 +00:00
reed@google.com
99b5c7f94b optimize translate and scale
add map2() to optimize for mapping an array of 2D points into homogeneous 4-vector
Review URL: https://codereview.appspot.com/6874064

git-svn-id: http://skia.googlecode.com/svn/trunk@6685 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-05 22:13:59 +00:00
djsollen@google.com
fdabcb511d Add missing SK_API definition at request of Chromium callers
Review URL: https://codereview.appspot.com/6878050

git-svn-id: http://skia.googlecode.com/svn/trunk@6671 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-05 06:15:42 +00:00
skia.committer@gmail.com
e659c2e820 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6660 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 02:01:25 +00:00
reed@google.com
7d68335eb4 add getTypes() to SkMatrix44, to cache how complex the matrix is.
add bench

optimize operator== by performing 4 compares in a row before checking
optimize setconcat by noting when we can write the answer directly into this

At least on this macbook, I had to mark helpers like isIdentity() as inline to get them inlined.
Review URL: https://codereview.appspot.com/6863053

git-svn-id: http://skia.googlecode.com/svn/trunk@6655 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 21:19:52 +00:00
robertphillips@google.com
93f0332418 Fixed remaining clang compiler warnings
https://codereview.appspot.com/6865053/



git-svn-id: http://skia.googlecode.com/svn/trunk@6646 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 17:35:19 +00:00
bsalomon@google.com
42619d8df2 Rename SkTDLinkedList to SkTInternalLinked list, add some methods useful for forthcoming SkTLList.
Review URL: https://codereview.appspot.com/6858101

git-svn-id: http://skia.googlecode.com/svn/trunk@6643 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 14:54:59 +00:00
jamesr@chromium.org
deb4c16969 Keep track of identity SkMatrix44s
This keeps a bool on SkMatrix44 indicating if we know for sure that the matrix
is identity, similar to the TypeMask on SkMatrix. This is useful to early-out
of potentially expensive matrix math at the cost of some memory.
Review URL: https://codereview.appspot.com/6854113

git-svn-id: http://skia.googlecode.com/svn/trunk@6620 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:17:16 +00:00
reed@google.com
fe7b1ed30a add SkPictureUtils::GatherPixelRefs()
Review URL: https://codereview.appspot.com/6845106

git-svn-id: http://skia.googlecode.com/svn/trunk@6615 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:00:39 +00:00
skia.committer@gmail.com
ab38f7acb3 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6577 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-28 02:02:11 +00:00
reed@google.com
631940c8c4 don't use bit-wise test for equality when using floats.
git-svn-id: http://skia.googlecode.com/svn/trunk@6557 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-27 13:13:22 +00:00
sugoi@google.com
7775fd5779 Deferred canvas can now be flushed if an image is beyond a certain size to avoid a costly image copy.
BUG=http://code.google.com/p/chromium/issues/detail?id=137924
TEST=TestDeferredCanvasBitmapSizeThreshold unit test
Review URL: https://codereview.appspot.com/6852071

git-svn-id: http://skia.googlecode.com/svn/trunk@6527 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 15:47:04 +00:00
vollick@chromium.org
f11cf9ff88 Add SkMatrix44::setColMajord, etc.
We have accessors for efficiently getting the matirx data, and it would be nice
if we had similar methods for setting the matrix entries.

Review URL: https://codereview.appspot.com/6851063

git-svn-id: http://skia.googlecode.com/svn/trunk@6494 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-19 21:02:06 +00:00
vollick@chromium.org
9b21c25e74 Add SkMatrix44::setTranspose
It turned out that adding getDouble(...) and setDouble(...) made this change
easier, so I've included that in this cl as well.

Review URL: https://codereview.appspot.com/6845048

git-svn-id: http://skia.googlecode.com/svn/trunk@6424 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-14 21:33:55 +00:00
vollick@chromium.org
5596a69e9f Add support for SK_MSCALAR_IS_FLOAT
The default is SK_MSCALAR_IS_FLOAT. You'll have to explicitly define SK_MSCALAR_IS_DOUBLE if that's what you want.

BUG=None

Review URL: https://codereview.appspot.com/6843049

git-svn-id: http://skia.googlecode.com/svn/trunk@6403 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 20:12:00 +00:00
vollick@chromium.org
3959a76ab0 Changing the visibility of SkMatrix44::determinant().
Review URL: https://codereview.appspot.com/6819080

git-svn-id: http://skia.googlecode.com/svn/trunk@6395 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 15:08:22 +00:00
reed@google.com
dd31131021 add const to src parameter for mapMScalars()
git-svn-id: http://skia.googlecode.com/svn/trunk@6386 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-12 20:43:59 +00:00
reed@google.com
1ea95be560 add explicit mapScalars and mapMScalars entry-points, instead of just map()
git-svn-id: http://skia.googlecode.com/svn/trunk@6373 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-09 21:39:48 +00:00
reed@google.com
20d44677a1 simplify macros, since we no longer support scalar == fixed
git-svn-id: http://skia.googlecode.com/svn/trunk@6372 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-09 21:28:55 +00:00
scroggo@google.com
4d3c28158a Implement SkCondVar for windows.
Only works on Vista or later, since it uses condition variables.

Review URL: https://codereview.appspot.com/6812062

git-svn-id: http://skia.googlecode.com/svn/trunk@6225 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-31 19:29:13 +00:00
scroggo@google.com
4177ef4b22 Add SkThreadPool for managing threads.
Skia-ized from https://codereview.appspot.com/6755043/

TODO: Use SkThread and platform independent features.

Review URL: https://codereview.appspot.com/6777064

git-svn-id: http://skia.googlecode.com/svn/trunk@6217 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-31 15:52:16 +00:00
junov@google.com
52a00cac51 Adding virtual method to SkDeferredCanvas::NotificationClient for signaling when commands are skipped due to the skip on clear optimization.
TEST=DeferredCanvas unit test
BUG=http://code.google.com/p/chromium/issues/detail?id=116840 
Review URL: https://codereview.appspot.com/6590050

git-svn-id: http://skia.googlecode.com/svn/trunk@5747 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-01 15:27:14 +00:00
junov@chromium.org
a38dfb6981 Adding hasPendingCommands API method to SkDeferredCanvas
BUG=http://code.google.com/p/chromium/issues/detail?id=146178
Review URL: https://codereview.appspot.com/6550050

git-svn-id: http://skia.googlecode.com/svn/trunk@5632 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-20 22:10:33 +00:00
junov@chromium.org
fb10389403 Adding a silent playback option to SkGPipeRead
Testing state consistency after silent playback in CanvasTest indirectly
through SkDeferredCanvas.

BUG=http://code.google.com/p/chromium/issues/detail?id=146178
TEST=CanvasTest unit test, and bench with --mode deferredSilent
Review URL: https://codereview.appspot.com/6542047

git-svn-id: http://skia.googlecode.com/svn/trunk@5619 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-20 19:35:43 +00:00
reed@google.com
7112173c3c re-re-land 5578
will follow w/ new .skp files to keep the waterfall green (I hope)



git-svn-id: http://skia.googlecode.com/svn/trunk@5584 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-18 15:14:33 +00:00
reed@google.com
10f9f4a844 revert 5580
git-svn-id: http://skia.googlecode.com/svn/trunk@5581 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-18 14:04:54 +00:00
reed@google.com
eab16dea1c re-land 5578 w/ pipe fix
git-svn-id: http://skia.googlecode.com/svn/trunk@5580 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-18 13:47:20 +00:00
reed@google.com
c75c36a14b revert 5578 -- broke pipe
git-svn-id: http://skia.googlecode.com/svn/trunk@5579 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-18 13:20:52 +00:00