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

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

Issue 1398843007: Move an #include out of a namespace. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | 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 /* 2 /*
3 * Copyright 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkData.h" 10 #include "SkData.h"
11 #include "SkDeflate.h" 11 #include "SkDeflate.h"
12 #include "SkStream.h" 12 #include "SkStream.h"
13 13
14 namespace {
15
16 #ifdef ZLIB_INCLUDE 14 #ifdef ZLIB_INCLUDE
17 #include ZLIB_INCLUDE 15 #include ZLIB_INCLUDE
18 #else 16 #else
19 #include "zlib.h" 17 #include "zlib.h"
20 #endif 18 #endif
21 19
20 namespace {
21
22 // Different zlib implementations use different T. 22 // Different zlib implementations use different T.
23 // We've seen size_t and unsigned. 23 // We've seen size_t and unsigned.
24 template <typename T> void* skia_alloc_func(void*, T items, T size) { 24 template <typename T> void* skia_alloc_func(void*, T items, T size) {
25 return sk_calloc_throw(SkToSizeT(items) * SkToSizeT(size)); 25 return sk_calloc_throw(SkToSizeT(items) * SkToSizeT(size));
26 } 26 }
27 27
28 void skia_free_func(void*, void* address) { sk_free(address); } 28 void skia_free_func(void*, void* address) { sk_free(address); }
29 29
30 } // namespace 30 } // namespace
31 31
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 fImpl->fInBuffer, fImpl->fInBufferIndex); 110 fImpl->fInBuffer, fImpl->fInBufferIndex);
111 fImpl->fInBufferIndex = 0; 111 fImpl->fInBufferIndex = 0;
112 } 112 }
113 } 113 }
114 return true; 114 return true;
115 } 115 }
116 116
117 size_t SkDeflateWStream::bytesWritten() const { 117 size_t SkDeflateWStream::bytesWritten() const {
118 return fImpl->fZStream.total_in + fImpl->fInBufferIndex; 118 return fImpl->fZStream.total_in + fImpl->fInBufferIndex;
119 } 119 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698