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

Side by Side Diff: src/pdf/SkDeflate.cpp

Issue 2273343002: SkPDF: Stop `#include PREPROCESSOR_DEFINE` pattern (Closed)
Patch Set: fix gyp/pdf.gyp syntax error Created 4 years, 3 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
« no previous file with comments | « public.bzl ('k') | src/pdf/SkPDFFont.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 2010 The Android Open Source Project 2 * Copyright 2010 The Android Open Source Project
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 8
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "SkDeflate.h" 10 #include "SkDeflate.h"
11 11
12 #ifdef ZLIB_INCLUDE 12 #include "zlib.h"
13 #include ZLIB_INCLUDE
14 #else
15 #include "zlib.h"
16 #endif
17 13
18 namespace { 14 namespace {
19 15
20 // Different zlib implementations use different T. 16 // Different zlib implementations use different T.
21 // We've seen size_t and unsigned. 17 // We've seen size_t and unsigned.
22 template <typename T> void* skia_alloc_func(void*, T items, T size) { 18 template <typename T> void* skia_alloc_func(void*, T items, T size) {
23 return sk_calloc_throw(SkToSizeT(items) * SkToSizeT(size)); 19 return sk_calloc_throw(SkToSizeT(items) * SkToSizeT(size));
24 } 20 }
25 21
26 void skia_free_func(void*, void* address) { sk_free(address); } 22 void skia_free_func(void*, void* address) { sk_free(address); }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 fImpl->fInBuffer, fImpl->fInBufferIndex); 111 fImpl->fInBuffer, fImpl->fInBufferIndex);
116 fImpl->fInBufferIndex = 0; 112 fImpl->fInBufferIndex = 0;
117 } 113 }
118 } 114 }
119 return true; 115 return true;
120 } 116 }
121 117
122 size_t SkDeflateWStream::bytesWritten() const { 118 size_t SkDeflateWStream::bytesWritten() const {
123 return fImpl->fZStream.total_in + fImpl->fInBufferIndex; 119 return fImpl->fZStream.total_in + fImpl->fInBufferIndex;
124 } 120 }
OLDNEW
« no previous file with comments | « public.bzl ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698