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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h

Issue 1880993003: Use RefPtr for SkBitmap::Allocator in ImageDecoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sharedBufferInterface6
Patch Set: Rebase to ToT Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // Clears decoded pixel data from all frames except the provided frame. 260 // Clears decoded pixel data from all frames except the provided frame.
261 // Callers may pass WTF::kNotFound to clear all frames. 261 // Callers may pass WTF::kNotFound to clear all frames.
262 // Note: If |m_frameBufferCache| contains only one frame, it won't be cleare d. 262 // Note: If |m_frameBufferCache| contains only one frame, it won't be cleare d.
263 // Returns the number of bytes of frame data actually cleared. 263 // Returns the number of bytes of frame data actually cleared.
264 virtual size_t clearCacheExceptFrame(size_t); 264 virtual size_t clearCacheExceptFrame(size_t);
265 265
266 // If the image has a cursor hot-spot, stores it in the argument 266 // If the image has a cursor hot-spot, stores it in the argument
267 // and returns true. Otherwise returns false. 267 // and returns true. Otherwise returns false.
268 virtual bool hotSpot(IntPoint&) const { return false; } 268 virtual bool hotSpot(IntPoint&) const { return false; }
269 269
270 virtual void setMemoryAllocator(SkBitmap::Allocator* allocator) 270 void setMemoryAllocator(PassRefPtr<SkBitmap::Allocator> allocator)
271 { 271 {
272 // FIXME: this doesn't work for images with multiple frames. 272 // FIXME: this doesn't work for images with multiple frames.
273 if (m_frameBufferCache.isEmpty()) { 273 if (m_frameBufferCache.isEmpty()) {
274 m_frameBufferCache.resize(1); 274 m_frameBufferCache.resize(1);
275 m_frameBufferCache[0].setRequiredPreviousFrameIndex( 275 m_frameBufferCache[0].setRequiredPreviousFrameIndex(
276 findRequiredPreviousFrame(0, false)); 276 findRequiredPreviousFrame(0, false));
277 } 277 }
278 m_frameBufferCache[0].setMemoryAllocator(allocator); 278 m_frameBufferCache[0].setMemoryAllocator(allocator);
279 } 279 }
280 280
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 bool m_failed; 347 bool m_failed;
348 348
349 #if USE(QCMSLIB) 349 #if USE(QCMSLIB)
350 OwnPtr<qcms_transform> m_sourceToOutputDeviceColorTransform; 350 OwnPtr<qcms_transform> m_sourceToOutputDeviceColorTransform;
351 #endif 351 #endif
352 }; 352 };
353 353
354 } // namespace blink 354 } // namespace blink
355 355
356 #endif 356 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698