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

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

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 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/SkXfermode_proccoeff.h ('k') | src/doc/SkDocument_PDF.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 2015 Google Inc. 2 * Copyright 2015 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 "SkBitmapCache.h" 8 #include "SkBitmapCache.h"
9 #include "SkResourceCache.h" 9 #include "SkResourceCache.h"
10 #include "SkYUVPlanesCache.h" 10 #include "SkYUVPlanesCache.h"
(...skipping 28 matching lines...) Expand all
39 fValue.fInfo = *info; 39 fValue.fInfo = *info;
40 fValue.fData->attachToCacheAndRef(); 40 fValue.fData->attachToCacheAndRef();
41 } 41 }
42 ~YUVPlanesRec() { 42 ~YUVPlanesRec() {
43 fValue.fData->detachFromCacheAndUnref(); 43 fValue.fData->detachFromCacheAndUnref();
44 } 44 }
45 45
46 YUVPlanesKey fKey; 46 YUVPlanesKey fKey;
47 YUVValue fValue; 47 YUVValue fValue;
48 48
49 const Key& getKey() const SK_OVERRIDE { return fKey; } 49 const Key& getKey() const override { return fKey; }
50 size_t bytesUsed() const SK_OVERRIDE { return sizeof(*this) + fValue.fData-> size(); } 50 size_t bytesUsed() const override { return sizeof(*this) + fValue.fData->siz e(); }
51 51
52 static bool Visitor(const SkResourceCache::Rec& baseRec, void* contextData) { 52 static bool Visitor(const SkResourceCache::Rec& baseRec, void* contextData) {
53 const YUVPlanesRec& rec = static_cast<const YUVPlanesRec&>(baseRec); 53 const YUVPlanesRec& rec = static_cast<const YUVPlanesRec&>(baseRec);
54 YUVValue* result = static_cast<YUVValue*>(contextData); 54 YUVValue* result = static_cast<YUVValue*>(contextData);
55 55
56 SkCachedData* tmpData = rec.fValue.fData; 56 SkCachedData* tmpData = rec.fValue.fData;
57 tmpData->ref(); 57 tmpData->ref();
58 if (NULL == tmpData->data()) { 58 if (NULL == tmpData->data()) {
59 tmpData->unref(); 59 tmpData->unref();
60 return false; 60 return false;
(...skipping 15 matching lines...) Expand all
76 76
77 *info = result.fInfo; 77 *info = result.fInfo;
78 return result.fData; 78 return result.fData;
79 } 79 }
80 80
81 void SkYUVPlanesCache::Add(uint32_t genID, SkCachedData* data, Info* info, 81 void SkYUVPlanesCache::Add(uint32_t genID, SkCachedData* data, Info* info,
82 SkResourceCache* localCache) { 82 SkResourceCache* localCache) {
83 YUVPlanesKey key(genID); 83 YUVPlanesKey key(genID);
84 return CHECK_LOCAL(localCache, add, Add, SkNEW_ARGS(YUVPlanesRec, (key, data , info))); 84 return CHECK_LOCAL(localCache, add, Add, SkNEW_ARGS(YUVPlanesRec, (key, data , info)));
85 } 85 }
OLDNEW
« no previous file with comments | « src/core/SkXfermode_proccoeff.h ('k') | src/doc/SkDocument_PDF.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698