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

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

Issue 1217573002: remove SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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/SkRTree.h ('k') | src/effects/SkLightingImageFilter.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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 "SkChecksum.h" 8 #include "SkChecksum.h"
9 #include "SkMessageBus.h" 9 #include "SkMessageBus.h"
10 #include "SkMipMap.h" 10 #include "SkMipMap.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // One of these should be explicit set by the caller after we return. 68 // One of these should be explicit set by the caller after we return.
69 fTotalByteLimit = 0; 69 fTotalByteLimit = 0;
70 fDiscardableFactory = NULL; 70 fDiscardableFactory = NULL;
71 } 71 }
72 72
73 #include "SkDiscardableMemory.h" 73 #include "SkDiscardableMemory.h"
74 74
75 class SkOneShotDiscardablePixelRef : public SkPixelRef { 75 class SkOneShotDiscardablePixelRef : public SkPixelRef {
76 public: 76 public:
77 SK_DECLARE_INST_COUNT(SkOneShotDiscardablePixelRef) 77
78 // Ownership of the discardablememory is transfered to the pixelref 78 // Ownership of the discardablememory is transfered to the pixelref
79 SkOneShotDiscardablePixelRef(const SkImageInfo&, SkDiscardableMemory*, size_ t rowBytes); 79 SkOneShotDiscardablePixelRef(const SkImageInfo&, SkDiscardableMemory*, size_ t rowBytes);
80 ~SkOneShotDiscardablePixelRef(); 80 ~SkOneShotDiscardablePixelRef();
81 81
82 protected: 82 protected:
83 bool onNewLockPixels(LockRec*) override; 83 bool onNewLockPixels(LockRec*) override;
84 void onUnlockPixels() override; 84 void onUnlockPixels() override;
85 size_t getAllocatedSizeInBytes() const override; 85 size_t getAllocatedSizeInBytes() const override;
86 86
87 private: 87 private:
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 638
639 size_t SkGraphics::SetResourceCacheSingleAllocationByteLimit(size_t newLimit) { 639 size_t SkGraphics::SetResourceCacheSingleAllocationByteLimit(size_t newLimit) {
640 return SkResourceCache::SetSingleAllocationByteLimit(newLimit); 640 return SkResourceCache::SetSingleAllocationByteLimit(newLimit);
641 } 641 }
642 642
643 void SkGraphics::PurgeResourceCache() { 643 void SkGraphics::PurgeResourceCache() {
644 SkImageFilter::PurgeCache(); 644 SkImageFilter::PurgeCache();
645 return SkResourceCache::PurgeAll(); 645 return SkResourceCache::PurgeAll();
646 } 646 }
647 647
OLDNEW
« no previous file with comments | « src/core/SkRTree.h ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698