History log of /external/skia/experimental/PdfViewer/inc/SkPdfTokenLooper.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/inc/SkPdfTokenLooper.h
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/inc/SkPdfTokenLooper.h
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/inc/SkPdfTokenLooper.h
bf6426120a8a9a034f37d37feaf942b1386b7a84 21-Nov-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> 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
/external/skia/experimental/PdfViewer/inc/SkPdfTokenLooper.h