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

Side by Side Diff: experimental/PdfViewer/SkPdfGraphicsState.h

Issue 23163007: pdfviewer: make pdfviewer compile on mac Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 | « no previous file | experimental/PdfViewer/SkPdfRenderer.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 #ifndef __DEFINED__SkPdfBasics 1 #ifndef __DEFINED__SkPdfBasics
2 #define __DEFINED__SkPdfBasics 2 #define __DEFINED__SkPdfBasics
3 3
4 #include "SkCanvas.h" 4 #include "SkCanvas.h"
5 #include "SkPaint.h" 5 #include "SkPaint.h"
6 #include "SkPdfConfig.h" 6 #include "SkPdfConfig.h"
7 #include "SkPdfUtils.h" 7 #include "SkPdfUtils.h"
8 8
9 #include <stack> 9 #include <stack>
10 10
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 fBlendModes[0] = SkXfermode::kSrc_Mode; // PDF: Normal Blend mode 352 fBlendModes[0] = SkXfermode::kSrc_Mode; // PDF: Normal Blend mode
353 fSMask = NULL; 353 fSMask = NULL;
354 } 354 }
355 355
356 // TODO(edisonn): make two functons instead, stroking and non stoking, avoid branching 356 // TODO(edisonn): make two functons instead, stroking and non stoking, avoid branching
357 void applyGraphicsState(SkPaint* paint, bool stroking); 357 void applyGraphicsState(SkPaint* paint, bool stroking);
358 }; 358 };
359 359
360 // TODO(edisonn): better class design. 360 // TODO(edisonn): better class design.
361 // TODO(edisonn): rename to SkPdfContext 361 // TODO(edisonn): rename to SkPdfContext
362 struct SkPdfContext { 362 class SkPdfContext {
363 std::stack<SkPdfNativeObject*> fObjectStack; 363 public:
364 std::stack<SkPdfNativeObject*> fObjectStack;
364 std::stack<SkPdfGraphicsState> fStateStack; 365 std::stack<SkPdfGraphicsState> fStateStack;
365 SkPdfGraphicsState fGraphicsState; 366 SkPdfGraphicsState fGraphicsState;
366 SkPdfNativeDoc* fPdfDoc; 367 SkPdfNativeDoc* fPdfDoc;
367 // TODO(edisonn): the allocator, could be freed after the page is done drawi ng. 368 // TODO(edisonn): the allocator, could be freed after the page is done drawi ng.
368 SkPdfAllocator* fTmpPageAllocator; 369 SkPdfAllocator* fTmpPageAllocator;
369 SkMatrix fOriginalMatrix; 370 SkMatrix fOriginalMatrix;
370 371
371 SkPdfContext(SkPdfNativeDoc* doc); 372 SkPdfContext(SkPdfNativeDoc* doc);
372 ~SkPdfContext(); 373 ~SkPdfContext();
373 }; 374 };
374 375
375 #endif // __DEFINED__SkPdfBasics 376 #endif // __DEFINED__SkPdfBasics
OLDNEW
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698