OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2012 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2008, 2012 Apple Computer, 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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #ifndef GeneratorGeneratedImage_h | 26 #ifndef GeneratorGeneratedImage_h |
27 #define GeneratorGeneratedImage_h | 27 #define GeneratorGeneratedImage_h |
28 | 28 |
29 #include "core/platform/Timer.h" | 29 #include "core/platform/Timer.h" |
30 #include "core/platform/graphics/GeneratedImage.h" | 30 #include "core/platform/graphics/GeneratedImage.h" |
31 #include "core/platform/graphics/Gradient.h" | 31 #include "core/platform/graphics/Gradient.h" |
32 #include "core/platform/graphics/Image.h" | 32 #include "core/platform/graphics/Image.h" |
33 #include "core/platform/graphics/ImageBuffer.h" | 33 #include "core/platform/graphics/ImageBuffer.h" |
34 #include "core/platform/graphics/IntSize.h" | 34 #include "core/platform/graphics/IntSize.h" |
35 #include <wtf/RefPtr.h> | 35 #include "wtf/RefPtr.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 static const int generatedImageCacheClearDelay = 1; | 39 static const int generatedImageCacheClearDelay = 1; |
40 | 40 |
41 class GeneratorGeneratedImage : public GeneratedImage { | 41 class GeneratorGeneratedImage : public GeneratedImage { |
42 public: | 42 public: |
43 static PassRefPtr<GeneratorGeneratedImage> create(PassRefPtr<Gradient> gener
ator, const IntSize& size) | 43 static PassRefPtr<GeneratorGeneratedImage> create(PassRefPtr<Gradient> gener
ator, const IntSize& size) |
44 { | 44 { |
45 return adoptRef(new GeneratorGeneratedImage(generator, size)); | 45 return adoptRef(new GeneratorGeneratedImage(generator, size)); |
(...skipping 27 matching lines...) Expand all Loading... |
73 | 73 |
74 OwnPtr<ImageBuffer> m_cachedImageBuffer; | 74 OwnPtr<ImageBuffer> m_cachedImageBuffer; |
75 DeferrableOneShotTimer<GeneratorGeneratedImage> m_cacheTimer; | 75 DeferrableOneShotTimer<GeneratorGeneratedImage> m_cacheTimer; |
76 IntSize m_cachedAdjustedSize; | 76 IntSize m_cachedAdjustedSize; |
77 unsigned m_cachedGeneratorHash; | 77 unsigned m_cachedGeneratorHash; |
78 }; | 78 }; |
79 | 79 |
80 } | 80 } |
81 | 81 |
82 #endif | 82 #endif |
OLD | NEW |