Commit Graph

426 Commits

Author SHA1 Message Date
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
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
scroggo@google.com
c6e1e9a9cc Fix warnings and Win only error in pdf_viewer.
git-svn-id: http://skia.googlecode.com/svn/trunk@12292 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 17:05:05 +00:00
scroggo@google.com
221253861d Include SkBitmapDevice for pdf_viewer.
git-svn-id: http://skia.googlecode.com/svn/trunk@12289 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 16:01:23 +00:00
edisonn@google.com
608c35e5c4 pdfviewer: readobject can return null, and catalog can be null
Review URL: https://codereview.chromium.org/72053002

git-svn-id: http://skia.googlecode.com/svn/trunk@12276 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-13 20:23:40 +00:00
reed@google.com
5308c83a36 drawPosTextOnPath is now deprecated, removing all overrides and impls
BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12270 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-13 15:22:15 +00:00
edisonn@google.com
04068b13e5 pdfviewer: remove sqrt from the formula computing the scale (DPI is dots per inch, not dots per square inch)
Review URL: https://codereview.chromium.org/70793003

git-svn-id: http://skia.googlecode.com/svn/trunk@12258 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-12 21:56:39 +00:00
scroggo@google.com
940ccc819b Add a script for running pdfviewer and comparing to existing results.
For quick, local checking to see how changes to pdfviewer have changed
PDF files.

Scripts were originally written by edisonn, and updated here for checkin.

R=epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12241 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-12 14:52:47 +00:00
scroggo@google.com
5c7be9584c Use SkPathJoin and SkBasename in Pdfviewer.
Remove redundant code.

R=edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12240 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-12 14:43:44 +00:00
edisonn@google.com
247ac53c29 pdfviewer: fix build break in windows (wrong return type on function)
Review URL: https://codereview.chromium.org/68973002

git-svn-id: http://skia.googlecode.com/svn/trunk@12216 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-11 15:36:44 +00:00
edisonn@google.com
b9731e7dd5 pdfviewr: include what you use (stdio)
Review URL: https://codereview.chromium.org/64913003

git-svn-id: http://skia.googlecode.com/svn/trunk@12179 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-07 22:07:34 +00:00
edisonn@google.com
5e4d9819db pdfviewer: fix typos (|| instead of |)
Review URL: https://codereview.chromium.org/65263002

git-svn-id: http://skia.googlecode.com/svn/trunk@12176 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-07 20:33:17 +00:00
scroggo@google.com
a7a946a617 Fix Mac warning in PdfViewer.
Move a function only used by code guarded by #ifdef PDF_REPORT inside
guard.

R=edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12170 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-07 18:22:18 +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
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
edisonn@google.com
d03c2c732e pdfviewer: more code comments + concat the pdf matrix with the existing matrix in canvas, instead of reseting it.
Review URL: https://codereview.chromium.org/27057003

git-svn-id: http://skia.googlecode.com/svn/trunk@11735 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 18:26:45 +00:00
edisonn@google.com
2af2ad9cc0 pdfviewer: (more code cleanup): class documentation and comments
Review URL: https://codereview.chromium.org/27043002

git-svn-id: http://skia.googlecode.com/svn/trunk@11730 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 16:17:44 +00:00
edisonn@google.com
e50d9a1fcd mode code cleanup (100c / l, comments)
Review URL: https://codereview.chromium.org/26912005

git-svn-id: http://skia.googlecode.com/svn/trunk@11716 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 20:58:22 +00:00
commit-bot@chromium.org
ab9d30cb01 basically a typo
R=caryclark@google.com, bsalomon@google.com

Author: yunchao.he@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11689 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 02:53:30 +00:00
edisonn@google.com
c8fda9d96b code cleanup
Review URL: https://codereview.chromium.org/26613006

git-svn-id: http://skia.googlecode.com/svn/trunk@11687 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 20:23:12 +00:00
edisonn@google.com
598cf5d3cf remove tracking code, as it polutes the code readability. Should be added back, in a less eficient way, by registering streams instead, so we don't have to pass arround the streams, and the code will be cleaner.
Review URL: https://codereview.chromium.org/26700002

git-svn-id: http://skia.googlecode.com/svn/trunk@11671 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 15:13:19 +00:00
edisonn@google.com
67d7fb4e89 pdf report files
Review URL: https://codereview.chromium.org/26271002

git-svn-id: http://skia.googlecode.com/svn/trunk@11629 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-07 15:40:21 +00:00
edisonn@google.com
af54a513a5 pdfviewer: do not submit, uploaded for backup, and will be done actually after I refactor the params for functions, to put the char* params in a structure: report errors and warnings in pdf, infrastructure
Review URL: https://codereview.chromium.org/23902018

git-svn-id: http://skia.googlecode.com/svn/trunk@11262 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 19:33:42 +00:00
edisonn@google.com
bca421b468 pdfviewer: (part 1) store the offset of the location of object in file/stream. In order to use the feature, enable the macro defined in SkPdfConfig.h
Review URL: https://codereview.chromium.org/23456022

git-svn-id: http://skia.googlecode.com/svn/trunk@11117 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-05 20:00:21 +00:00
edisonn@google.com
0fd25d8b22 pdfviewer: track what objects have been used during rendering. It will be the base of reporting unused objects to warn about ineficiencies in pdf generations, tests, and what features are not implemented fully.
Review URL: https://codereview.chromium.org/23601017

git-svn-id: http://skia.googlecode.com/svn/trunk@11100 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-05 16:40:34 +00:00
edisonn@google.com
e91260c3e7 pdfviewer: fix break, include the right header.
Review URL: https://codereview.chromium.org/23493018

git-svn-id: http://skia.googlecode.com/svn/trunk@11083 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 17:29:06 +00:00
mtklein@google.com
bd6343b1d6 Rewrite SkTRegistry to take any trivially-copyable type.
Obviously these are all currently function pointers of type T(*)(P) for various
T and P.  In bench refactoring, I'm trying to register a function pointer of
type T(*)(), which can't be done as is (passing P=void doesn't work).  This
also lets us register things like primitives, which is conceivable useful.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11082 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 17:20:18 +00:00
commit-bot@chromium.org
a6f37e77c1 Add ShouldSkip variant that can read a --match flag directly.
Just seemed like we were going through lots of hoops for this common case.

BUG=
R=scroggo@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11034 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-30 15:52:46 +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
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
epoger@google.com
1c9518b09d Remove experimental/json-expectations , no longer needed.
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10941 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-27 16:48:04 +00:00
edisonn@google.com
73613c16e1 pdfviewer: if the resources are missing, exit (right now inheritance is not implemented)
Review URL: https://codereview.chromium.org/23125015

git-svn-id: http://skia.googlecode.com/svn/trunk@10875 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-22 15:48:35 +00:00
mtklein@google.com
330313a8a8 My clang now doesn't complain about !"foo".
BUG=
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10874 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-22 15:37:26 +00:00
edisonn@google.com
f68aed3381 pdfviewer: when q start, and an operator is called, it should not be able to see operands before q. nest/unnest are similar with pop/push - simulates a stack of stacks, in a single stack
Review URL: https://codereview.chromium.org/23033022

git-svn-id: http://skia.googlecode.com/svn/trunk@10873 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-22 15:37:21 +00:00
edisonn@google.com
bd2f30132e pdfviewer: add macros to automatically check number and type of parameters
Review URL: https://codereview.chromium.org/23038021

git-svn-id: http://skia.googlecode.com/svn/trunk@10872 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-22 14:18:04 +00:00
skia.committer@gmail.com
37c18e4e38 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10871 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-22 07:01:59 +00:00
edisonn@google.com
cf2cfa174c pdfviewer: code cleanup - add licence on files, make replace __DEFINE__foo with foo_DEFINED to match skia project
Review URL: https://codereview.chromium.org/23361009

git-svn-id: http://skia.googlecode.com/svn/trunk@10854 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-21 16:31:37 +00:00
skia.committer@gmail.com
b74bdf0249 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10842 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-21 07:01:29 +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
edisonn@google.com
8cee797901 pdfviewer: check in pdfapi classes
Review URL: https://codereview.chromium.org/22900010

git-svn-id: http://skia.googlecode.com/svn/trunk@10834 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-20 18:56:49 +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
tfarina@chromium.org
f6de475e5c Replace uses of GrAssert by SkASSERT.
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-17 00:02:59 +00:00
edisonn@google.com
5c34491b94 pdfviewer: remove one #include to STL, that is not needed
Review URL: https://codereview.chromium.org/23082004

git-svn-id: http://skia.googlecode.com/svn/trunk@10783 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-16 17:37:31 +00:00
edisonn@google.com
2c8177767a pdfviewer: update interface of derived canvas and device, to reflect lastest changes in the interfaces.
Review URL: https://codereview.chromium.org/23048006

git-svn-id: http://skia.googlecode.com/svn/trunk@10780 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-16 16:30:02 +00:00
edisonn@google.com
063d7072ef pdfviewer: code cleanup - remove STL usage
Review URL: https://codereview.chromium.org/23258004

git-svn-id: http://skia.googlecode.com/svn/trunk@10772 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-16 15:05:08 +00:00
edisonn@google.com
fb7b1bf534 pdfviewer: workaround gyp issue with multiple files, not being translated into an array in linux (works in mac, as per spec)
Review URL: https://codereview.chromium.org/23157003

git-svn-id: http://skia.googlecode.com/svn/trunk@10726 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-14 22:05:06 +00:00
edisonn@google.com
33f11b6fcd pdfviewer: make pdfviewer compile on mac
Review URL: https://codereview.chromium.org/23163007

git-svn-id: http://skia.googlecode.com/svn/trunk@10721 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-14 21:35:27 +00:00
edisonn@google.com
3aa355527a pdfviewer: 1) debug code for drawText (show magenta background for text, to show text even when we fail to load/show it), 2) some cleanup: refactor and rename classes and files
Review URL: https://codereview.chromium.org/23020003

git-svn-id: http://skia.googlecode.com/svn/trunk@10716 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-14 18:26:20 +00:00