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

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

Issue 274563005: Revert 173540 "Use skia discardable memory for decoded images on..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | 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 (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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 { 77 {
78 return bitmap.pixelRef() 78 return bitmap.pixelRef()
79 && bitmap.pixelRef()->getURI() 79 && bitmap.pixelRef()->getURI()
80 && (!memcmp(bitmap.pixelRef()->getURI(), labelLazyDecoded, sizeof(labelL azyDecoded)) 80 && (!memcmp(bitmap.pixelRef()->getURI(), labelLazyDecoded, sizeof(labelL azyDecoded))
81 || !memcmp(bitmap.pixelRef()->getURI(), labelDiscardable, sizeof(lab elDiscardable))); 81 || !memcmp(bitmap.pixelRef()->getURI(), labelDiscardable, sizeof(lab elDiscardable)));
82 } 82 }
83 83
84 void DeferredImageDecoder::setEnabled(bool enabled) 84 void DeferredImageDecoder::setEnabled(bool enabled)
85 { 85 {
86 s_enabled = enabled; 86 s_enabled = enabled;
87 // FIXME: Remove all non-discardable memory related code now that this is 87 #if !OS(ANDROID)
88 // used on all platforms. 88 // FIXME: This code is temporary to enable discardable memory for
89 // non-Android platforms. In the future all platforms will be
90 // the same and we can remove this code.
89 s_skiaDiscardableMemoryEnabled = enabled; 91 s_skiaDiscardableMemoryEnabled = enabled;
90 if (enabled) 92 if (enabled)
91 ImageDecodingStore::setImageCachingEnabled(false); 93 ImageDecodingStore::setImageCachingEnabled(false);
94 #endif
92 } 95 }
93 96
94 bool DeferredImageDecoder::enabled() 97 bool DeferredImageDecoder::enabled()
95 { 98 {
96 return s_enabled; 99 return s_enabled;
97 } 100 }
98 101
99 String DeferredImageDecoder::filenameExtension() const 102 String DeferredImageDecoder::filenameExtension() const
100 { 103 {
101 return m_actualDecoder ? m_actualDecoder->filenameExtension() : m_filenameEx tension; 104 return m_actualDecoder ? m_actualDecoder->filenameExtension() : m_filenameEx tension;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 return bitmap; 333 return bitmap;
331 } 334 }
332 335
333 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const 336 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const
334 { 337 {
335 // TODO: Implement. 338 // TODO: Implement.
336 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; 339 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false;
337 } 340 }
338 341
339 } // namespace WebCore 342 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698