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

Side by Side Diff: experimental/PdfViewer/SkPdfRenderer.cpp

Issue 18093005: pdfviewer: some code cleanup in renderer (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « experimental/PdfViewer/SkPdfRenderer.h ('k') | experimental/PdfViewer/pdf_viewer_main.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkForceLinking.h" 10 #include "SkForceLinking.h"
11 #include "SkGraphics.h" 11 #include "SkGraphics.h"
12 #include "SkImageDecoder.h" 12 #include "SkImageDecoder.h"
13 #include "SkImageEncoder.h" 13 #include "SkImageEncoder.h"
14 #include "SkOSFile.h" 14 #include "SkOSFile.h"
15 #include "SkPicture.h" 15 #include "SkPicture.h"
16 #include "SkStream.h" 16 #include "SkStream.h"
17 #include "SkTypeface.h" 17 #include "SkTypeface.h"
18 #include "SkTArray.h" 18 #include "SkTArray.h"
19 19
20 #include "SkPdfBasics.h"
21 #include "SkPdfNativeTokenizer.h"
22
20 #include <iostream> 23 #include <iostream>
21 #include <cstdio> 24 #include <cstdio>
22 #include <stack> 25 #include <stack>
23 #include <set> 26 #include <set>
24 27
28 extern "C" PdfContext* gPdfContext;
29 extern "C" SkBitmap* gDumpBitmap;
30 extern "C" SkCanvas* gDumpCanvas;
31
25 __SK_FORCE_IMAGE_DECODER_LINKING; 32 __SK_FORCE_IMAGE_DECODER_LINKING;
26 33
27 // TODO(edisonn): tool, show what objects were read at least, show the ones not even read 34 // TODO(edisonn): tool, show what objects were read at least, show the ones not even read
28 // keep for each object pos in file 35 // keep for each object pos in file
29 // plug in for VS? syntax coloring, show selected object ... from the text, or f rom rendered x,y 36 // plug in for VS? syntax coloring, show selected object ... from the text, or f rom rendered x,y
30 37
31 // TODO(edisonn): security - validate all the user input, all pdf! 38 // TODO(edisonn): security - validate all the user input, all pdf!
32 39
33 // TODO(edisonn): put drawtext in #ifdefs, so comparations will ignore minor cha nges in text positioning and font 40 // TODO(edisonn): put drawtext in #ifdefs, so comparations will ignore minor cha nges in text positioning and font
34 // this way, we look more at other features and layout in diffs 41 // this way, we look more at other features and layout in diffs
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 2017
2011 SkRect SkPdfRenderer::MediaBox(int page) const { 2018 SkRect SkPdfRenderer::MediaBox(int page) const {
2012 SkASSERT(fPdfDoc); 2019 SkASSERT(fPdfDoc);
2013 return fPdfDoc->MediaBox(page); 2020 return fPdfDoc->MediaBox(page);
2014 } 2021 }
2015 2022
2016 size_t SkPdfRenderer::bytesUsed() const { 2023 size_t SkPdfRenderer::bytesUsed() const {
2017 return fPdfDoc ? fPdfDoc->bytesUsed() : 0; 2024 return fPdfDoc ? fPdfDoc->bytesUsed() : 0;
2018 } 2025 }
2019 2026
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfRenderer.h ('k') | experimental/PdfViewer/pdf_viewer_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698