| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |