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

Side by Side Diff: Source/platform/graphics/DeferredImageDecoder.cpp

Issue 485833005: Image decoding: Remove deprecated image caching code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool DeferredImageDecoder::isLazyDecoded(const SkBitmap& bitmap) 71 bool DeferredImageDecoder::isLazyDecoded(const SkBitmap& bitmap)
72 { 72 {
73 return bitmap.pixelRef() 73 return bitmap.pixelRef()
74 && bitmap.pixelRef()->getURI() 74 && bitmap.pixelRef()->getURI()
75 && !memcmp(bitmap.pixelRef()->getURI(), labelDiscardable, sizeof(labelDi scardable)); 75 && !memcmp(bitmap.pixelRef()->getURI(), labelDiscardable, sizeof(labelDi scardable));
76 } 76 }
77 77
78 void DeferredImageDecoder::setEnabled(bool enabled) 78 void DeferredImageDecoder::setEnabled(bool enabled)
79 { 79 {
80 s_enabled = enabled; 80 s_enabled = enabled;
81 if (enabled)
82 ImageDecodingStore::setImageCachingEnabled(false);
83 } 81 }
84 82
85 bool DeferredImageDecoder::enabled() 83 bool DeferredImageDecoder::enabled()
86 { 84 {
87 return s_enabled; 85 return s_enabled;
88 } 86 }
89 87
90 String DeferredImageDecoder::filenameExtension() const 88 String DeferredImageDecoder::filenameExtension() const
91 { 89 {
92 return m_actualDecoder ? m_actualDecoder->filenameExtension() : m_filenameEx tension; 90 return m_actualDecoder ? m_actualDecoder->filenameExtension() : m_filenameEx tension;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 return bitmap; 285 return bitmap;
288 } 286 }
289 287
290 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const 288 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const
291 { 289 {
292 // TODO: Implement. 290 // TODO: Implement.
293 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; 291 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false;
294 } 292 }
295 293
296 } // namespace blink 294 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/DeferredImageDecoder.h ('k') | Source/platform/graphics/DiscardablePixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698