Commit Graph

13 Commits

Author SHA1 Message Date
scroggo
3e5622764a Add copyright headers to remaining gyp files.
Prevents some PRESUBMIT errors.

TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/1035523003
2015-03-25 10:22:41 -07:00
reed
859b92448b move some headers out of public
patch from issue 338263003

BUG=skia:
R=mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/339183002
2014-06-17 09:04:45 -07:00
commit-bot@chromium.org
f84722e477 Build Skia for a bare-bones embedded Linux system.
Motivation:

    I have downloaded a barebones Linux system built for 64-bit ARM
    from linaro.org and a ARMv8 Foundation Model from arm.com to run
    it on.  This will let us build and test Skia on ARM64 before we
    aquire hardware to allow that.  This CL introduces the changes to
    the build files necessary to build Skia on a barebones embedded
    Linux system.  I tested it with the aarch64 GCC compiler provided
    by linaro.org.

Changes:

    Add a "barelinux" target_os for the DEPS file.  Add an optional
    git download of zlib.

    Changes to gyp files: these changes abstract out libpng, libz, and
    giflib so that images.gyp doesn't know whether they are static or
    dynamically linked.  I also add the variables skia_giflib_static,
    skia_libpng_static, skia_zlib_static, and skia_freetype_static,
    all of which default to false but when set to true will override
    the behavior of the giflib, libpng, zlib, and freetype build
    targets to require them to build statically.  Also, the
    skia_no_fontconfig variable turns off use of the fontconfig service.

	Scripts in platform_tools/barelinux/bin:

    arm64_download - this script downloads the Linaro's ARMv8 Aarch64
	toolchain and minimal embedded Linux system as well as ARM's
	foundation model.  The required files are mirrored on Google
	Cloud.  The script then starts a emulated Arm64 Linux system in
	the background.  After the boot is complete, you can SSH into the
	system at port 8022 via user@localhost.  The SSH key will be
	downloaded into the working directery as well.

	download_deps - Uses gclient to download Skia's dependencies for a
    bare Linux system (the normal dependecies plus giflib, libpng, and
    zlib.)

	barelinux_make - this script builds a version of skia that does
    not depend on external libraries, perfect for putting in an
    embedded system running Linux.  Assumes you have run download_deps
    first.

To test:
    To build a barelinux target, use the barelinux_make script.

    To build for a armv8 system: skia_arch_type=arm arm_neon=0 armv7=1
    armv8=1 arm_thumb=0 skia_arch_width=64 and set the CC and CXX
    variables to point at the cross-compiler downloaded by
    arm64_download.

R=djsollen@google.com, scroggo@google.com, borenet@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13570 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-24 20:22:34 +00:00
commit-bot@chromium.org
611fde182a Remove the comments settings for vim tab width and expansion variables.
These add unnecessary bloat for everyone to carry around, so we just
remove them now.

The same change was made in chromium by Tony in
http://codereview.chromium.org/7310019 - crrev.com/92046

BUG=None
TEST=./gyp_skia
R=mtklein@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12443 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 22:23:03 +00:00
scroggo@google.com
5092adc546 Separate and update PDF_DIFF_TRACE_IN_PNG
Move its functionality out of readToken() and into its own class.
Callers of the previous readToken() now call
SkPdfNativeTokenizer::readToken(), which in turn calls a function
for writing the diff to a file, if the caller requests it and
PDF_TRACE_DIFF_IN_PNG is defined.

Do not attempt to draw a diff for compatibility sections, which we
do not draw.

Use SkString to handle string manipulation.

Hide globals only used by PDF_TRACE_DIFF_IN_PNG behind that flag.

Remove hasVisualEffects, which always returns true.

Rename gLastOpKeyword to gOpCounter for clarity.

In SkPdfNativeTokenizer, set fEmpty to true when the entire stream
has been read.

Use SkBitmap::copyTo instead of manually copying an SkBitmap.

Builds on https://codereview.chromium.org/79933003/

R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12436 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 20:22:31 +00:00
scroggo@google.com
248647cebb Restructuring of PdfViewer code.
The only change in behavior is that SkPdfAllocator on SkPdfContext is
no longer allocated on the heap.

In general, I have just moved code.

SkPdfContext:
Inherit from SkNoncopyable.
Make SkPdfContext directly own fTmpPageAllocator. fTmpPageAllocator is
created when SkPdfContext is, and destroyed at the same time as well,
so there is no reason for the extra allocation.
Add the function parseStream. This eliminates code duplication, and
allows making fTmpPageAllocator private.
Move PdfMainLooper into the implementation file, since it is now only
used by parseStream.
Move SkTDictWithDefaultConstructor and render stats info here, in
support of PdfMainLooper.

SkPdfTokenLooper:
Rename PdfTokenLooper to SkPdfTokenLooper.
Move readToken here, unchanged.
Remove tokenizer(), which is unused.

SkPdfNativeDoc:
Remove tokenizerOfPage and tokenizerOfBuffer, which are unused.

SkPdfOps:
Move gPdfOps and PdfOperatorRenderer into a header file (hidden for
now), so they can be accessed by both SkPdfRenderer.cpp and
SkPdfContext.cpp.

SkPdfRenderer:
Harvest things into other files:
PdfMainLooper (and the code that calls it) -> SkPdfContext.
readToken -> SkPdfTokenLooper.

R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12435 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 20:18:09 +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
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
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
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
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
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
edisonn@google.com
63ce82fb41 pdfviewer: (cleanup) put the gyp for library code in a separate file
Review URL: https://codereview.chromium.org/23038004

git-svn-id: http://skia.googlecode.com/svn/trunk@10779 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-16 16:13:44 +00:00