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

Side by Side Diff: src/core/SkImageFilter.cpp

Issue 1215393002: Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: skimagefilter Created 5 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
« no previous file with comments | « src/core/SkGlyphCache_Globals.h ('k') | src/core/SkMessageBus.h » ('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 2012 The Android Open Source Project 2 * Copyright 2012 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 #include "SkImageFilter.h" 8 #include "SkImageFilter.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
11 #include "SkBitmapDevice.h" 11 #include "SkBitmapDevice.h"
12 #include "SkChecksum.h" 12 #include "SkChecksum.h"
13 #include "SkDevice.h" 13 #include "SkDevice.h"
14 #include "SkLazyPtr.h" 14 #include "SkLazyPtr.h"
15 #include "SkMatrixImageFilter.h" 15 #include "SkMatrixImageFilter.h"
16 #include "SkMutex.h"
16 #include "SkReadBuffer.h" 17 #include "SkReadBuffer.h"
17 #include "SkWriteBuffer.h"
18 #include "SkRect.h" 18 #include "SkRect.h"
19 #include "SkTDynamicHash.h" 19 #include "SkTDynamicHash.h"
20 #include "SkTInternalLList.h" 20 #include "SkTInternalLList.h"
21 #include "SkValidationUtils.h" 21 #include "SkValidationUtils.h"
22 #include "SkWriteBuffer.h"
22 #if SK_SUPPORT_GPU 23 #if SK_SUPPORT_GPU
23 #include "GrContext.h" 24 #include "GrContext.h"
24 #include "GrDrawContext.h" 25 #include "GrDrawContext.h"
25 #include "SkGrPixelRef.h" 26 #include "SkGrPixelRef.h"
26 #include "SkGr.h" 27 #include "SkGr.h"
27 #endif 28 #endif
28 29
29 #ifdef SK_BUILD_FOR_IOS 30 #ifdef SK_BUILD_FOR_IOS
30 enum { kDefaultCacheSize = 2 * 1024 * 1024 }; 31 enum { kDefaultCacheSize = 2 * 1024 * 1024 };
31 #else 32 #else
32 enum { kDefaultCacheSize = 128 * 1024 * 1024 }; 33 enum { kDefaultCacheSize = 128 * 1024 * 1024 };
33 #endif 34 #endif
34 35
35 static int32_t next_image_filter_unique_id() { 36 static int32_t next_image_filter_unique_id() {
36 static int32_t gImageFilterUniqueID; 37 static int32_t gImageFilterUniqueID;
37 38
38 // Never return 0. 39 // Never return 0.
39 int32_t id; 40 int32_t id;
40 do { 41 do {
41 id = sk_atomic_inc(&gImageFilterUniqueID) + 1; 42 id = sk_atomic_inc(&gImageFilterUniqueID) + 1;
42 } while (0 == id); 43 } while (0 == id);
43 return id; 44 return id;
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 dev = SkBitmapDevice::Create(cinfo.fInfo, surfaceProps); 540 dev = SkBitmapDevice::Create(cinfo.fInfo, surfaceProps);
540 } 541 }
541 return dev; 542 return dev;
542 } 543 }
543 544
544 bool SkImageFilter::Proxy::filterImage(const SkImageFilter* filter, const SkBitm ap& src, 545 bool SkImageFilter::Proxy::filterImage(const SkImageFilter* filter, const SkBitm ap& src,
545 const SkImageFilter::Context& ctx, 546 const SkImageFilter::Context& ctx,
546 SkBitmap* result, SkIPoint* offset) { 547 SkBitmap* result, SkIPoint* offset) {
547 return fDevice->filterImage(filter, src, ctx, result, offset); 548 return fDevice->filterImage(filter, src, ctx, result, offset);
548 } 549 }
549 550
OLDNEW
« no previous file with comments | « src/core/SkGlyphCache_Globals.h ('k') | src/core/SkMessageBus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698