OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. |
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const IntSize& size() const { return m_surface->size(); } | 85 const IntSize& size() const { return m_surface->size(); } |
86 bool isAccelerated() const { return m_surface->isAccelerated(); } | 86 bool isAccelerated() const { return m_surface->isAccelerated(); } |
87 bool isRecording() const { return m_surface->isRecording(); } | 87 bool isRecording() const { return m_surface->isRecording(); } |
88 void setHasExpensiveOp() { m_surface->setHasExpensiveOp(); } | 88 void setHasExpensiveOp() { m_surface->setHasExpensiveOp(); } |
89 bool isExpensiveToPaint() const { return m_surface->isExpensiveToPaint(); } | 89 bool isExpensiveToPaint() const { return m_surface->isExpensiveToPaint(); } |
90 void prepareSurfaceForPaintingIfNeeded() { m_surface->prepareSurfaceForPaint
ingIfNeeded(); } | 90 void prepareSurfaceForPaintingIfNeeded() { m_surface->prepareSurfaceForPaint
ingIfNeeded(); } |
91 bool isSurfaceValid() const; | 91 bool isSurfaceValid() const; |
92 bool restoreSurface() const; | 92 bool restoreSurface() const; |
93 void didDraw(const FloatRect&) const; | 93 void didDraw(const FloatRect&) const; |
94 bool wasDrawnToAfterSnapshot() const { return m_snapshotState == DrawnToAfte
rSnapshot; } | 94 bool wasDrawnToAfterSnapshot() const { return m_snapshotState == DrawnToAfte
rSnapshot; } |
| 95 void didDisableAcceleration() const; |
95 | 96 |
96 void setFilterQuality(SkFilterQuality filterQuality) { m_surface->setFilterQ
uality(filterQuality); } | 97 void setFilterQuality(SkFilterQuality filterQuality) { m_surface->setFilterQ
uality(filterQuality); } |
97 void setIsHidden(bool hidden) { m_surface->setIsHidden(hidden); } | 98 void setIsHidden(bool hidden) { m_surface->setIsHidden(hidden); } |
98 | 99 |
99 // Called by subclasses of ImageBufferSurface to install a new canvas object
. | 100 // Called by subclasses of ImageBufferSurface to install a new canvas object
. |
100 // Virtual for mocking | 101 // Virtual for mocking |
101 virtual void resetCanvas(SkCanvas*) const; | 102 virtual void resetCanvas(SkCanvas*) const; |
102 | 103 |
103 SkCanvas* canvas() const; | 104 SkCanvas* canvas() const; |
104 void disableDeferral(DisableDeferralReason) const; | 105 void disableDeferral(DisableDeferralReason) const; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 int height() const { return m_size.height(); } | 174 int height() const { return m_size.height(); } |
174 int width() const { return m_size.width(); } | 175 int width() const { return m_size.width(); } |
175 | 176 |
176 const unsigned char* m_data; | 177 const unsigned char* m_data; |
177 const IntSize m_size; | 178 const IntSize m_size; |
178 }; | 179 }; |
179 | 180 |
180 } // namespace blink | 181 } // namespace blink |
181 | 182 |
182 #endif // ImageBuffer_h | 183 #endif // ImageBuffer_h |
OLD | NEW |