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

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

Issue 1054073003: Minimal Changes to run tests on iOS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 5 years, 8 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 | « experimental/iOSSampleApp/Shared/skia_ios.mm ('k') | tests/StreamTest.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 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 "SkChecksum.h" 11 #include "SkChecksum.h"
12 #include "SkDevice.h" 12 #include "SkDevice.h"
13 #include "SkLazyPtr.h" 13 #include "SkLazyPtr.h"
14 #include "SkMatrixImageFilter.h" 14 #include "SkMatrixImageFilter.h"
15 #include "SkReadBuffer.h" 15 #include "SkReadBuffer.h"
16 #include "SkWriteBuffer.h" 16 #include "SkWriteBuffer.h"
17 #include "SkRect.h" 17 #include "SkRect.h"
18 #include "SkTDynamicHash.h" 18 #include "SkTDynamicHash.h"
19 #include "SkTInternalLList.h" 19 #include "SkTInternalLList.h"
20 #include "SkValidationUtils.h" 20 #include "SkValidationUtils.h"
21 #if SK_SUPPORT_GPU 21 #if SK_SUPPORT_GPU
22 #include "GrContext.h" 22 #include "GrContext.h"
23 #include "SkGrPixelRef.h" 23 #include "SkGrPixelRef.h"
24 #include "SkGr.h" 24 #include "SkGr.h"
25 #endif 25 #endif
26 26
27 enum { kDefaultCacheSize = 128 * 1024 * 1024 }; 27 #ifdef SK_BUILD_FOR_IOS
28 enum { kDefaultCacheSize = 2 * 1024 * 1024 };
29 #else
30 enum { kDefaultCacheSize = 128 * 1024 * 1024 };
31 #endif
28 32
29 static int32_t next_image_filter_unique_id() { 33 static int32_t next_image_filter_unique_id() {
30 static int32_t gImageFilterUniqueID; 34 static int32_t gImageFilterUniqueID;
31 35
32 // Never return 0. 36 // Never return 0.
33 int32_t id; 37 int32_t id;
34 do { 38 do {
35 id = sk_atomic_inc(&gImageFilterUniqueID) + 1; 39 id = sk_atomic_inc(&gImageFilterUniqueID) + 1;
36 } while (0 == id); 40 } while (0 == id);
37 return id; 41 return id;
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 498
495 SkImageFilter::Cache* SkImageFilter::Cache::Create(size_t maxBytes) { 499 SkImageFilter::Cache* SkImageFilter::Cache::Create(size_t maxBytes) {
496 return SkNEW_ARGS(CacheImpl, (maxBytes)); 500 return SkNEW_ARGS(CacheImpl, (maxBytes));
497 } 501 }
498 502
499 SK_DECLARE_STATIC_LAZY_PTR(SkImageFilter::Cache, cache, CreateCache); 503 SK_DECLARE_STATIC_LAZY_PTR(SkImageFilter::Cache, cache, CreateCache);
500 504
501 SkImageFilter::Cache* SkImageFilter::Cache::Get() { 505 SkImageFilter::Cache* SkImageFilter::Cache::Get() {
502 return cache.get(); 506 return cache.get();
503 } 507 }
OLDNEW
« no previous file with comments | « experimental/iOSSampleApp/Shared/skia_ios.mm ('k') | tests/StreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698