Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Issue 59493011: Pdfviewer refactoring. (Closed)

Created:
7 years, 1 month ago by scroggo
Modified:
7 years, 1 month ago
Reviewers:
edisonn
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

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 Committed: https://code.google.com/p/skia/source/detail?r=12296

Patch Set 1 #

Patch Set 2 : Line length #

Patch Set 3 : Fix SampleApp (call new API). Remove TODOs #

Patch Set 4 : Move include/ to inc/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -3379 lines) Patch
D experimental/PdfViewer/SkPdfRenderer.h View 1 chunk +0 lines, -85 lines 0 comments Download
D experimental/PdfViewer/SkPdfRenderer.cpp View 1 chunk +0 lines, -3159 lines 0 comments Download
A + experimental/PdfViewer/inc/SkPdfRenderer.h View 1 2 3 3 chunks +13 lines, -18 lines 0 comments Download
M experimental/PdfViewer/pdf_viewer_main.cpp View 1 2 4 chunks +47 lines, -66 lines 0 comments Download
M experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.h View 1 chunk +1 line, -0 lines 0 comments Download
M experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp View 3 chunks +5 lines, -5 lines 0 comments Download
A + experimental/PdfViewer/src/SkPdfRenderer.cpp View 1 chunk +32 lines, -32 lines 0 comments Download
M gyp/SampleApp.gyp View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M gyp/gm.gyp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M gyp/pdfviewer.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M gyp/pdfviewer_lib.gyp View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M samplecode/SamplePdfFileViewer.cpp View 1 2 1 chunk +9 lines, -11 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
scroggo
7 years, 1 month ago (2013-11-14 14:43:56 UTC) #1
edisonn
LGTM
7 years, 1 month ago (2013-11-14 14:54:57 UTC) #2
scroggo
7 years, 1 month ago (2013-11-14 19:09:36 UTC) #3
Message was sent while issue was closed.
Committed patchset #4 manually as r12296 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698