History log of /external/skia/experimental/PdfViewer/src/SkPdfContext.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8272d87d3098c8e43feae5bd7bb2b4a7ab8f3337 03-Dec-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove SkPdfNativeDoc::tokenizerOfStream.

Instead, initialize an SkPdfNativeTokenizer directly on the stack.

Fixes a memory leak in SkPdfFont.

R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12462 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/experimental/PdfViewer/src/SkPdfContext.cpp
36026de64400cbe91552c549cf9a906a0926fef3 02-Dec-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Simplify SkPdfTokenLooper behavior.

Instead of passing a pointer to a pointer to a NULL looper, which can
then be set to point to a new looper (which then must be looped and
deleted), pass a pointer to the current looper. Each function can then
create a looper based on the parent (on the stack) and call loop()
itself.

Remove setUp(). Now that there is a pointer to the parent at creation
time, there is no need for this function.

Modify the constructors to only provide ones that are needed.

Add documentation.

Remove PdfInlineImageLooper::done(), which is never used.

R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12447 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/experimental/PdfViewer/src/SkPdfContext.cpp
5f008652f69ce7809b920b9fa573bc72216acd51 02-Dec-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove some PdfViewer warnings.

Fix build.

git-svn-id: http://skia.googlecode.com/svn/trunk@12438 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/experimental/PdfViewer/src/SkPdfContext.cpp
5092adc5461a7c5cb3e1fad01be2174c3f4a0c46 02-Dec-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> 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
/external/skia/experimental/PdfViewer/src/SkPdfContext.cpp
248647cebb3724fd2ce1d41745afb786516af4f8 02-Dec-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> 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
/external/skia/experimental/PdfViewer/src/SkPdfContext.cpp
d906702f7812807d79eeaba65acff62235990b64 20-Nov-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> 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
/external/skia/experimental/PdfViewer/src/SkPdfContext.cpp