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

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

Issue 985583002: Don't cache any SkBitmaps in DeferredImageDecoder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed test Created 5 years, 9 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) 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 29 matching lines...) Expand all
40 #include "wtf/text/WTFString.h" 40 #include "wtf/text/WTFString.h"
41 41
42 #if USE(QCMSLIB) 42 #if USE(QCMSLIB)
43 #include "qcms.h" 43 #include "qcms.h"
44 #endif 44 #endif
45 45
46 typedef Vector<char> ColorProfile; 46 typedef Vector<char> ColorProfile;
47 47
48 namespace blink { 48 namespace blink {
49 49
50 // GIF and WebP support animation. The explanation below is in terms of GIF,
51 // but the same constants are used for WebP, too.
52 // GIFs have an optional 16-bit unsigned loop count that describes how an
53 // animated GIF should be cycled. If the loop count is absent, the animation
54 // cycles once; if it is 0, the animation cycles infinitely; otherwise the
55 // animation plays n + 1 cycles (where n is the specified loop count). If the
56 // GIF decoder defaults to cAnimationLoopOnce in the absence of any loop count
57 // and translates an explicit "0" loop count to cAnimationLoopInfinite, then we
58 // get a couple of nice side effects:
59 // * By making cAnimationLoopOnce be 0, we allow the animation cycling code in
60 // BitmapImage.cpp to avoid special-casing it, and simply treat all
61 // non-negative loop counts identically.
62 // * By making the other two constants negative, we avoid conflicts with any
63 // real loop count values.
64 const int cAnimationLoopOnce = 0;
65 const int cAnimationLoopInfinite = -1;
66 const int cAnimationNone = -2;
67
50 // ImagePlanes can be used to decode color components into provided buffers inst ead of using an ImageFrame. 68 // ImagePlanes can be used to decode color components into provided buffers inst ead of using an ImageFrame.
51 class PLATFORM_EXPORT ImagePlanes { 69 class PLATFORM_EXPORT ImagePlanes {
52 public: 70 public:
53 ImagePlanes(); 71 ImagePlanes();
54 ImagePlanes(void* planes[3], size_t rowBytes[3]); 72 ImagePlanes(void* planes[3], size_t rowBytes[3]);
55 73
56 void* plane(int); 74 void* plane(int);
57 size_t rowBytes(int) const; 75 size_t rowBytes(int) const;
58 76
59 private: 77 private:
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 340
323 IntSize m_size; 341 IntSize m_size;
324 bool m_sizeAvailable; 342 bool m_sizeAvailable;
325 bool m_isAllDataReceived; 343 bool m_isAllDataReceived;
326 bool m_failed; 344 bool m_failed;
327 }; 345 };
328 346
329 } // namespace blink 347 } // namespace blink
330 348
331 #endif 349 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698