OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef ImageBufferSurface_h | 31 #ifndef ImageBufferSurface_h |
32 #define ImageBufferSurface_h | 32 #define ImageBufferSurface_h |
33 | 33 |
34 #include "platform/PlatformExport.h" | 34 #include "platform/PlatformExport.h" |
35 #include "platform/geometry/IntSize.h" | 35 #include "platform/geometry/IntSize.h" |
36 #include "platform/graphics/GraphicsTypes.h" | 36 #include "platform/graphics/GraphicsTypes.h" |
37 #include "platform/graphics/GraphicsTypes3D.h" | 37 #include "platform/graphics/GraphicsTypes3D.h" |
| 38 #include "third_party/skia/include/core/SkPaint.h" |
38 #include "wtf/FastAllocBase.h" | 39 #include "wtf/FastAllocBase.h" |
39 #include "wtf/Noncopyable.h" | 40 #include "wtf/Noncopyable.h" |
40 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
41 | 42 |
42 class SkBitmap; | 43 class SkBitmap; |
43 class SkCanvas; | 44 class SkCanvas; |
44 class SkImage; | 45 class SkImage; |
45 class SkPicture; | 46 class SkPicture; |
46 | 47 |
47 namespace blink { | 48 namespace blink { |
(...skipping 20 matching lines...) Expand all Loading... |
68 virtual bool restore() { return false; }; | 69 virtual bool restore() { return false; }; |
69 virtual WebLayer* layer() const { return 0; }; | 70 virtual WebLayer* layer() const { return 0; }; |
70 virtual bool isAccelerated() const { return false; } | 71 virtual bool isAccelerated() const { return false; } |
71 virtual bool needsClipTracking() const { return false; } | 72 virtual bool needsClipTracking() const { return false; } |
72 virtual Platform3DObject getBackingTexture() const { return 0; } | 73 virtual Platform3DObject getBackingTexture() const { return 0; } |
73 virtual void didModifyBackingTexture() { } | 74 virtual void didModifyBackingTexture() { } |
74 virtual bool cachedBitmapEnabled() const { return false; } | 75 virtual bool cachedBitmapEnabled() const { return false; } |
75 virtual const SkBitmap& cachedBitmap() const; | 76 virtual const SkBitmap& cachedBitmap() const; |
76 virtual void invalidateCachedBitmap() { } | 77 virtual void invalidateCachedBitmap() { } |
77 virtual void updateCachedBitmapIfNeeded() { } | 78 virtual void updateCachedBitmapIfNeeded() { } |
| 79 virtual void setFilterLevel(SkPaint::FilterLevel) { } |
78 virtual void setIsHidden(bool) { } | 80 virtual void setIsHidden(bool) { } |
79 virtual void setImageBuffer(ImageBuffer*) { } | 81 virtual void setImageBuffer(ImageBuffer*) { } |
80 virtual PassRefPtr<SkPicture> getPicture(); | 82 virtual PassRefPtr<SkPicture> getPicture(); |
81 virtual void didClearCanvas() { } | 83 virtual void didClearCanvas() { } |
82 virtual void finalizeFrame(const FloatRect &dirtyRect) { } | 84 virtual void finalizeFrame(const FloatRect &dirtyRect) { } |
83 virtual void willDrawVideo() { } | 85 virtual void willDrawVideo() { } |
84 virtual PassRefPtr<SkImage> newImageSnapshot() const; | 86 virtual PassRefPtr<SkImage> newImageSnapshot() const; |
85 virtual void draw(GraphicsContext*, const FloatRect& destRect, const FloatRe
ct& srcRect, CompositeOperator, WebBlendMode, bool needsCopy); | 87 virtual void draw(GraphicsContext*, const FloatRect& destRect, const FloatRe
ct& srcRect, CompositeOperator, WebBlendMode, bool needsCopy); |
86 | 88 |
87 OpacityMode opacityMode() const { return m_opacityMode; } | 89 OpacityMode opacityMode() const { return m_opacityMode; } |
88 const IntSize& size() const { return m_size; } | 90 const IntSize& size() const { return m_size; } |
89 void notifyIsValidChanged(bool isValid) const; | 91 void notifyIsValidChanged(bool isValid) const; |
90 | 92 |
91 protected: | 93 protected: |
92 ImageBufferSurface(const IntSize&, OpacityMode); | 94 ImageBufferSurface(const IntSize&, OpacityMode); |
93 void clear(); | 95 void clear(); |
94 | 96 |
95 private: | 97 private: |
96 OpacityMode m_opacityMode; | 98 OpacityMode m_opacityMode; |
97 IntSize m_size; | 99 IntSize m_size; |
98 }; | 100 }; |
99 | 101 |
100 } // namespace blink | 102 } // namespace blink |
101 | 103 |
102 #endif | 104 #endif |
OLD | NEW |