robertphillips@google.com
9bf380ce7f
drawBitmap* cleanup
...
https://codereview.chromium.org/19977003/
git-svn-id: http://skia.googlecode.com/svn/trunk@10342 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-25 12:10:42 +00:00
commit-bot@chromium.org
4740135407
Fix Clang build on SkPDFResourceDict (CL 18977002)
...
R=edisonn@google.com , vandebo@chromium.org
Author: richardlin@chromium.org
Review URL: https://chromiumcodereview.appspot.com/19954011
git-svn-id: http://skia.googlecode.com/svn/trunk@10295 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 21:49:29 +00:00
vandebo@chromium.org
fc16667077
Revert "Adds SkPDFResourceDict class, refactor existing code to use it."
...
This reverts commit r10245
Review URL: https://codereview.chromium.org/19523007
git-svn-id: http://skia.googlecode.com/svn/trunk@10247 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-22 18:31:24 +00:00
commit-bot@chromium.org
3a8dfc36ae
Adds SkPDFResourceDict class, refactor existing code to use it.
...
Committed: http://code.google.com/p/skia/source/detail?r=10202
R=vandebo@chromium.org , edisonn@google.com
Author: richardlin@chromium.org
Review URL: https://chromiumcodereview.appspot.com/18977002
git-svn-id: http://skia.googlecode.com/svn/trunk@10245 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-22 18:20:52 +00:00
vandebo@chromium.org
d322cf4939
Revert "Adds SkPDFResourceDict class to manage resource dicts. Refactors existing code to use this class."
...
This reverts commit r10202
Review URL: https://codereview.chromium.org/19790007
git-svn-id: http://skia.googlecode.com/svn/trunk@10205 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 20:13:44 +00:00
commit-bot@chromium.org
c84fb471d1
Adds SkPDFResourceDict class to manage resource dicts. Refactors existing code to use this class.
...
BUG=
R=vandebo@chromium.org , edisonn@google.com
Author: richardlin@chromium.org
Review URL: https://chromiumcodereview.appspot.com/18977002
git-svn-id: http://skia.googlecode.com/svn/trunk@10202 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 18:58:34 +00:00
edisonn@google.com
a20e42c08b
Remove SK_API, from SkTSet. the template is not public.
...
Review URL: https://codereview.chromium.org/15792016
git-svn-id: http://skia.googlecode.com/svn/trunk@9374 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 18:04:20 +00:00
edisonn@google.com
d9dfa18372
Encode images with DCTDecode (JPEG) in PDFs if it makes sense. Fallback to FlateDecode (zip) if it makes sense. Otherewise include uncompressed stream.
...
This change will reduce the size of PDFs to 50% (in the case of the existing SKPs, we reduce the total size of PDFs from 105MB to 50MB)
Review URL: https://codereview.appspot.com/7068055
git-svn-id: http://skia.googlecode.com/svn/trunk@8835 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-24 13:01:01 +00:00
tfarina@chromium.org
7731eada5b
Fix more clang errors.
...
Fixed -Wunused-private-field errors.
R=reed@google.com ,bsalomon@google.com
Review URL: https://codereview.chromium.org/13474012
git-svn-id: http://skia.googlecode.com/svn/trunk@8547 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-05 21:13:14 +00:00
edisonn@google.com
6addb19300
resubmit https://code.google.com/p/skia/source/detail?r=7883 (in the meantime we
...
added capability to collect minidump and callstack if buildbot fails with heap
coruption in windows, and a NPE bug was fixed in SkPDFDocument, when document was destroyed without ever beeing used and a field was NULL + a few minor conflicts have been resolved)
git-svn-id: http://skia.googlecode.com/svn/trunk@8487 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 15:33:08 +00:00
robertphillips@google.com
acef3c4082
Reverting r8233 (Use SkSet in PDF)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@8255 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 14:42:51 +00:00
edisonn@google.com
66bedbb02d
resubmit https://code.google.com/p/skia/source/detail?r=7883 (in the meantime we added capability to collect minidump and callstack if buildbot fails with heap coruption in windows. a few minor conflicts have been resolved)
...
Review URL: https://codereview.chromium.org/12840004
git-svn-id: http://skia.googlecode.com/svn/trunk@8233 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 17:19:05 +00:00
edisonn@google.com
8c020612ba
Update flag to reflect actual meaning.
...
Review URL: https://codereview.chromium.org/12754004
git-svn-id: http://skia.googlecode.com/svn/trunk@8118 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-12 19:53:16 +00:00
epoger@google.com
b58772f866
PDF: add support for named destinations.
...
Landing patchset 7 from https://codereview.appspot.com/7374052 for dml@google.com
Review URL: https://codereview.chromium.org/12533009
git-svn-id: http://skia.googlecode.com/svn/trunk@8034 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-08 09:09:10 +00:00
epoger@google.com
812b6f59fa
Revert r8000 due to failures on some buildbots
...
git-svn-id: http://skia.googlecode.com/svn/trunk@8001 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-06 00:47:22 +00:00
epoger@google.com
1cad898916
PDF: add support for named destinations
...
Imported from https://codereview.appspot.com/7374052/ on behalf of dml@google.com
Review URL: https://codereview.chromium.org/12466008
git-svn-id: http://skia.googlecode.com/svn/trunk@8000 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-06 00:05:13 +00:00
edisonn@google.com
5bd26d32ab
revert r7892
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7896 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 14:01:44 +00:00
edisonn@google.com
194b7cdb50
resubmit after fixing assert issue: https://codereview.appspot.com/6744050
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7892 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 19:45:11 +00:00
edisonn@google.com
d1c53aae59
Revert r7883
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7884 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 17:46:09 +00:00
edisonn@google.com
676aef05ab
Use SkSet to fix issue when pdf generates an exp number of resources.
...
The problem fixed - http://code.google.com/p/skia/issues/detail?id=940 - is that getResources will recursively obtain all child resource recursively without checking for duplicates.
If we have lots of duplicates, then we try to build a very large vector (exponential with the number of nodes usually) and sooner or later we end up using too much memory and crash.
A possible solution could have been to make sure resources do not have duplicates, but that requirement is impractical, and it this leaves the solution fragile, if there is any issue in the tree, we crash.
When we emit the pdf, the large number of duplicates is not an issue, because SkPDFCatalog::addObject will deal with duplicates.
I have run the gm with --config pdf, and the images are 100% same bits, while the pdfs have the same size but some very small changes, the order of some objects.
Review URL: https://codereview.appspot.com/6744050
git-svn-id: http://skia.googlecode.com/svn/trunk@7883 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 16:54:44 +00:00
edisonn@google.com
2ae67e70cd
add custom implementation for drawBitmapRect to shield from changes in SkDevice
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7696 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-12 01:06:38 +00:00
reed@google.com
af777278c5
remove use of SkRefPtr in public header (SkPDFDocument.h)
...
Review URL: https://codereview.appspot.com/6546048
git-svn-id: http://skia.googlecode.com/svn/trunk@5612 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-20 18:19:26 +00:00
reed@google.com
fc641d09e5
remove all SkRefPtr from SkPDFDevice.h
...
Review URL: https://codereview.appspot.com/6542049
git-svn-id: http://skia.googlecode.com/svn/trunk@5609 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-20 17:52:20 +00:00
reed@google.com
2a006c1127
begin to skiafy PDF headers : removing use of SkRefPtr
...
Review URL: https://codereview.appspot.com/6526050
git-svn-id: http://skia.googlecode.com/svn/trunk@5596 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-19 17:05:55 +00:00
vandebo@chromium.org
238be8c7e5
[PDF] Add link annotations.
...
Review URL: https://codereview.appspot.com/6346100
git-svn-id: http://skia.googlecode.com/svn/trunk@4609 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 20:06:02 +00:00
robertphillips@google.com
40a1ae4df2
Added SkDevice onAttachToCanvas & onDetachFromCanvas methods
...
http://codereview.appspot.com/6348100/
git-svn-id: http://skia.googlecode.com/svn/trunk@4598 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 15:36:15 +00:00
vandebo@chromium.org
7d6c8f997f
[PDF] Move most of the headers to be private.
...
Compute font stats in SkPDFDocument in order to make more of the headers private.
Previous review: https://codereview.appspot.com/5868049/
Review URL: https://codereview.appspot.com/5875049
git-svn-id: http://skia.googlecode.com/svn/trunk@3470 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-22 20:45:15 +00:00
vandebo@chromium.org
ec1a7fa304
Move SkBitSet to utils.
...
Review URL: https://codereview.appspot.com/5875043
git-svn-id: http://skia.googlecode.com/svn/trunk@3460 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-21 23:11:46 +00:00
vandebo@chromium.org
76d6de0845
Revert "[PDF] Move most of the headers to be private."
...
This reverts r3457
TBR=epoger@google.com
Review URL: https://codereview.appspot.com/5866051
git-svn-id: http://skia.googlecode.com/svn/trunk@3458 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-21 20:31:08 +00:00
vandebo@chromium.org
bd960c7f19
[PDF] Move most of the headers to be private.
...
Compute font stats in SkPDFDocument in order to make more of the headers private.
Previous review: https://codereview.appspot.com/5865048/
Review URL: https://codereview.appspot.com/5868049
git-svn-id: http://skia.googlecode.com/svn/trunk@3457 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-21 19:59:04 +00:00
vandebo@chromium.org
008c498b58
Revert "[PDF] Move most of the headers to be private."
...
This reverts r3453
TBR=epoger@google.com
Review URL: https://codereview.appspot.com/5869048
git-svn-id: http://skia.googlecode.com/svn/trunk@3454 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-21 17:55:04 +00:00
vandebo@chromium.org
f7f9aa8bd9
[PDF] Move most of the headers to be private.
...
Compute font stats in SkPDFDocument in order to make more of the headers private.
Review URL: https://codereview.appspot.com/5865048
git-svn-id: http://skia.googlecode.com/svn/trunk@3453 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-21 17:45:06 +00:00
vandebo@chromium.org
188838c208
[PDF] Fix memory hungry inefficiency in pdf resource tracking.
...
When moving the content of a device into a PDF object like SkPDFFormXObject
or SkPDFShader does, we only need the top level resources in the new object's
resource list, not the recursive set of objects. Otherwise, when you
put a form on a form on form, etc, references to the objects multiply.
This fixed http://crbug.com/117321
Review URL: https://codereview.appspot.com/5796048
git-svn-id: http://skia.googlecode.com/svn/trunk@3360 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-09 22:16:58 +00:00
vandebo@chromium.org
74b4619616
Formatting cleanup: remove extra whitespace
...
Change by arthurhsu@chromium.org , original CL: http://codereview.appspot.com/5587049/
Review URL: https://codereview.appspot.com/5594043
git-svn-id: http://skia.googlecode.com/svn/trunk@3098 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-28 01:45:11 +00:00
digit@google.com
1771cbf43d
posix: Avoid static initializers in static/global mutexes
...
This patch removes static initializers related to static and
global mutexes from the final library's machine code when
building on a pthread-capable system.
We use PTHREAD_MUTEX_INITIALIZER to perform POD-style
initialization. You need a line like the following to declare
a global mutex with it:
SkBaseMutex gMutex = { PTHREAD_MUTEX_INITIALIZER };
We introduce the SK_DECLARE_STATIC_MUTEX and SK_DECLARE_GLOBAL_MUTEX
macros to be able to declare static/global mutexes in the source tree
uniformly.
SkMutex is now defined as a sub-class of SkBaseMutex, with standard
construction/destruction semantics. This is useful if the mutex
object is a member of another C++ class, or allocated dynamically.
We also modify a few places to refer to SkBaseMutex instead of a
SkMutex, where it makes sense. Generally speaking, client code
should hold and use pointers to SkBaseMutex whenever they can
now.
We defined a new built-time macro named SK_USE_POSIX_THREADS
to indicate that we're using a pthread-based SkThread.h
interface. The macro will also be used in future patches
to implement other helper thread synchronization classes.
Finally, we inline the acquire() and release() functions in the
case of Posix to improve performance a bit.
Running: 'bench -repeat 10 -match mutex' on an Android device or
a 2.4GHz Xeon Linux desktop shows the following improvements:
Before After
Galaxy Nexus 1.64 1.45
Nexus S 1.47 1.16
Xoom 1.86 1.66
Xeon 0.36 0.31
This removes 5 static mutex initializers from the library
Review URL: https://codereview.appspot.com/5501066
git-svn-id: http://skia.googlecode.com/svn/trunk@3091 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-26 21:26:40 +00:00
reed@google.com
b55deeb1c7
add allowImageFilter() so a device can allow/disallow filters
...
(esp. for printing)
git-svn-id: http://skia.googlecode.com/svn/trunk@2981 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-06 14:43:09 +00:00
reed@google.com
982cb875f0
add SK_OVERRIDE, move subclass impls of virtuals into .cpp
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2823 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-07 18:34:08 +00:00
bsalomon@google.com
6850eab42b
Override 32BPP format in SkCanvas::readPixels
...
Review URL: http://codereview.appspot.com/5330073/
git-svn-id: http://skia.googlecode.com/svn/trunk@2600 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-03 20:29:47 +00:00
bsalomon@google.com
910267dde2
Make SkDevice::onReadPixels take a const& rather than const*
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2587 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-02 20:06:25 +00:00
bsalomon@google.com
c69809745e
Recommit r2584 with gpu pass of the new ReadPixels test disabled in fixed pt (gpu code doesn't work in general in fixed pt).
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2586 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-02 19:57:21 +00:00
bsalomon@google.com
ace7bd5623
Revert r2584 (new test fails in fixed pt builds)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2585 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-02 19:39:51 +00:00
bsalomon@google.com
1a8ddf0a35
Changes the SkCanvas::readPixels API. Allows caller to read into prealloced bitmap pixels. Changes how clipping to device bounds is handled.
...
Review URL: http://codereview.appspot.com/5307077/
git-svn-id: http://skia.googlecode.com/svn/trunk@2584 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-02 19:34:16 +00:00
bungeman@google.com
b29c883fb4
Add xps device to skia.
...
http://codereview.appspot.com/5076041/
git-svn-id: http://skia.googlecode.com/svn/trunk@2437 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-10-10 13:19:10 +00:00
vandebo@chromium.org
5676b4a23a
Revert r2122, r2116, r2108 Now that Chrome's PlatformDevice doesn't inherit from SkDevice.
...
Review URL: http://codereview.appspot.com/5178045
git-svn-id: http://skia.googlecode.com/svn/trunk@2396 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-10-03 19:03:48 +00:00
tomhudson@google.com
8a0b0291ae
Revert r2250 - removal of setMatrixClip() - because Chrome makes heavy use
...
of those functions in a way we're not yet ready to clean up.
git-svn-id: http://skia.googlecode.com/svn/trunk@2254 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-09-13 14:41:06 +00:00
tomhudson@google.com
66d57255ad
Replaces SkDevice::setMatrixClip() with markMatrixDirty() and markClipDirty(),
...
which require no arguments and so may be called without requiring the matrix
and clip to be completely evaluated.
De-inlines virtual functions in SkDevice interface.
git-svn-id: http://skia.googlecode.com/svn/trunk@2250 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-09-12 19:52:44 +00:00
epoger@google.com
17b7894609
rolling back the experimental rollbacks in r2178-2179
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2180 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-26 14:40:38 +00:00
epoger@google.com
5f226572b3
rolling tree back to its state as of r2169 to see if that fixes Windows buildbots
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2179 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-26 14:27:59 +00:00
twiz@google.com
8185f33b38
Export SkPDFDevice::setDrawingArea as SK_API.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2172 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-25 19:27:20 +00:00
ctguil@chromium.org
769fa6a013
No effect cleanup in pdf code.
...
Review URL: http://codereview.appspot.com/4927042
git-svn-id: http://skia.googlecode.com/svn/trunk@2146 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-20 00:36:18 +00:00