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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual const SkBitmap& bitmap() const; | 58 virtual const SkBitmap& bitmap() const; |
59 virtual void willUse() { } // Called by ImageBuffer before reading or writin
g to the surface. | 59 virtual void willUse() { } // Called by ImageBuffer before reading or writin
g to the surface. |
60 virtual bool isValid() const = 0; | 60 virtual bool isValid() const = 0; |
61 virtual blink::WebLayer* layer() const { return 0; }; | 61 virtual blink::WebLayer* layer() const { return 0; }; |
62 virtual bool isAccelerated() const { return false; } | 62 virtual bool isAccelerated() const { return false; } |
63 virtual Platform3DObject getBackingTexture() const { return 0; } | 63 virtual Platform3DObject getBackingTexture() const { return 0; } |
64 virtual bool cachedBitmapEnabled() const { return false; } | 64 virtual bool cachedBitmapEnabled() const { return false; } |
65 virtual const SkBitmap& cachedBitmap() const; | 65 virtual const SkBitmap& cachedBitmap() const; |
66 virtual void invalidateCachedBitmap() { } | 66 virtual void invalidateCachedBitmap() { } |
67 virtual void updateCachedBitmapIfNeeded() { } | 67 virtual void updateCachedBitmapIfNeeded() { } |
| 68 virtual void setIsHidden(bool) { } |
68 | 69 |
69 OpacityMode opacityMode() const { return m_opacityMode; } | 70 OpacityMode opacityMode() const { return m_opacityMode; } |
70 const IntSize& size() const { return m_size; } | 71 const IntSize& size() const { return m_size; } |
71 | 72 |
72 protected: | 73 protected: |
73 void clear(); | 74 void clear(); |
74 | 75 |
75 ImageBufferSurface(const IntSize& size, OpacityMode opacityMode) | 76 ImageBufferSurface(const IntSize& size, OpacityMode opacityMode) |
76 : m_opacityMode(opacityMode) | 77 : m_opacityMode(opacityMode) |
77 , m_size(size) | 78 , m_size(size) |
78 { } | 79 { |
| 80 setIsHidden(false); |
| 81 } |
79 | 82 |
80 private: | 83 private: |
81 OpacityMode m_opacityMode; | 84 OpacityMode m_opacityMode; |
82 IntSize m_size; | 85 IntSize m_size; |
83 }; | 86 }; |
84 | 87 |
85 } // namespace WebCore | 88 } // namespace WebCore |
86 | 89 |
87 #endif | 90 #endif |
OLD | NEW |