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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 Opaque, | 53 Opaque, |
54 }; | 54 }; |
55 | 55 |
56 class PLATFORM_EXPORT ImageBufferSurface { | 56 class PLATFORM_EXPORT ImageBufferSurface { |
57 WTF_MAKE_NONCOPYABLE(ImageBufferSurface); WTF_MAKE_FAST_ALLOCATED; | 57 WTF_MAKE_NONCOPYABLE(ImageBufferSurface); WTF_MAKE_FAST_ALLOCATED; |
58 public: | 58 public: |
59 virtual ~ImageBufferSurface() { } | 59 virtual ~ImageBufferSurface() { } |
60 | 60 |
61 virtual SkCanvas* canvas() const = 0; | 61 virtual SkCanvas* canvas() const = 0; |
62 virtual const SkBitmap& bitmap(); | 62 virtual const SkBitmap& bitmap(); |
63 virtual void willUse() { } // Called by ImageBuffer before reading or writin
g to the surface. | 63 virtual void didDraw() { } |
64 virtual void willReadback() { } | 64 virtual void willReadback() { } |
65 virtual bool isValid() const = 0; | 65 virtual bool isValid() const = 0; |
66 virtual bool restore() { return false; }; | 66 virtual bool restore() { return false; }; |
67 virtual blink::WebLayer* layer() const { return 0; }; | 67 virtual blink::WebLayer* layer() const { return 0; }; |
68 virtual bool isAccelerated() const { return false; } | 68 virtual bool isAccelerated() const { return false; } |
69 virtual Platform3DObject getBackingTexture() const { return 0; } | 69 virtual Platform3DObject getBackingTexture() const { return 0; } |
70 virtual bool cachedBitmapEnabled() const { return false; } | 70 virtual bool cachedBitmapEnabled() const { return false; } |
71 virtual const SkBitmap& cachedBitmap() const; | 71 virtual const SkBitmap& cachedBitmap() const; |
72 virtual void invalidateCachedBitmap() { } | 72 virtual void invalidateCachedBitmap() { } |
73 virtual void updateCachedBitmapIfNeeded() { } | 73 virtual void updateCachedBitmapIfNeeded() { } |
(...skipping 11 matching lines...) Expand all Loading... |
85 void clear(); | 85 void clear(); |
86 | 86 |
87 private: | 87 private: |
88 OpacityMode m_opacityMode; | 88 OpacityMode m_opacityMode; |
89 IntSize m_size; | 89 IntSize m_size; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace blink | 92 } // namespace blink |
93 | 93 |
94 #endif | 94 #endif |
OLD | NEW |