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

Side by Side Diff: Source/core/platform/graphics/chromium/ImageDecodingStore.cpp

Issue 47623002: Fix more warnings on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix RenderImage.cpp. Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 256 }
257 prune(); 257 prune();
258 } 258 }
259 259
260 size_t ImageDecodingStore::memoryUsageInBytes() 260 size_t ImageDecodingStore::memoryUsageInBytes()
261 { 261 {
262 MutexLocker lock(m_mutex); 262 MutexLocker lock(m_mutex);
263 return m_memoryUsageInBytes; 263 return m_memoryUsageInBytes;
264 } 264 }
265 265
266 unsigned ImageDecodingStore::cacheEntries() 266 int ImageDecodingStore::cacheEntries()
267 { 267 {
268 MutexLocker lock(m_mutex); 268 MutexLocker lock(m_mutex);
269 return m_imageCacheMap.size() + m_decoderCacheMap.size(); 269 return m_imageCacheMap.size() + m_decoderCacheMap.size();
270 } 270 }
271 271
272 unsigned ImageDecodingStore::imageCacheEntries() 272 int ImageDecodingStore::imageCacheEntries()
273 { 273 {
274 MutexLocker lock(m_mutex); 274 MutexLocker lock(m_mutex);
275 return m_imageCacheMap.size(); 275 return m_imageCacheMap.size();
276 } 276 }
277 277
278 unsigned ImageDecodingStore::decoderCacheEntries() 278 int ImageDecodingStore::decoderCacheEntries()
279 { 279 {
280 MutexLocker lock(m_mutex); 280 MutexLocker lock(m_mutex);
281 return m_decoderCacheMap.size(); 281 return m_decoderCacheMap.size();
282 } 282 }
283 283
284 void ImageDecodingStore::prune() 284 void ImageDecodingStore::prune()
285 { 285 {
286 TRACE_EVENT0("webkit", "ImageDecodingStore::prune"); 286 TRACE_EVENT0("webkit", "ImageDecodingStore::prune");
287 287
288 Vector<OwnPtr<CacheEntry> > cacheEntriesToDelete; 288 Vector<OwnPtr<CacheEntry> > cacheEntriesToDelete;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 } 400 }
401 } 401 }
402 402
403 void ImageDecodingStore::removeFromCacheListInternal(const Vector<OwnPtr<CacheEn try> >& deletionList) 403 void ImageDecodingStore::removeFromCacheListInternal(const Vector<OwnPtr<CacheEn try> >& deletionList)
404 { 404 {
405 for (size_t i = 0; i < deletionList.size(); ++i) 405 for (size_t i = 0; i < deletionList.size(); ++i)
406 m_orderedCacheList.remove(deletionList[i].get()); 406 m_orderedCacheList.remove(deletionList[i].get());
407 } 407 }
408 408
409 } // namespace WebCore 409 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698