OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 bool PrepareTextureMailbox( | 106 bool PrepareTextureMailbox( |
107 cc::TextureMailbox* outMailbox, | 107 cc::TextureMailbox* outMailbox, |
108 std::unique_ptr<cc::SingleReleaseCallback>* outReleaseCallback) override; | 108 std::unique_ptr<cc::SingleReleaseCallback>* outReleaseCallback) override; |
109 | 109 |
110 // Callback for mailboxes given to the compositor from PrepareTextureMailbox. | 110 // Callback for mailboxes given to the compositor from PrepareTextureMailbox. |
111 void mailboxReleased(const gpu::Mailbox&, | 111 void mailboxReleased(const gpu::Mailbox&, |
112 const gpu::SyncToken&, | 112 const gpu::SyncToken&, |
113 bool lostResource); | 113 bool lostResource); |
114 | 114 |
115 // ImageBufferSurface implementation | 115 // ImageBufferSurface implementation |
116 void finalizeFrame(const FloatRect& dirtyRect); | 116 void finalizeFrame(); |
| 117 void doPaintInvalidation(const FloatRect& dirtyRect); |
117 void willWritePixels(); | 118 void willWritePixels(); |
118 void willOverwriteAllPixels(); | 119 void willOverwriteAllPixels(); |
119 void willOverwriteCanvas(); | 120 void willOverwriteCanvas(); |
120 PaintCanvas* canvas(); | 121 PaintCanvas* canvas(); |
121 void disableDeferral(DisableDeferralReason); | 122 void disableDeferral(DisableDeferralReason); |
122 bool checkSurfaceValid(); | 123 bool checkSurfaceValid(); |
123 bool restoreSurface(); | 124 bool restoreSurface(); |
124 WebLayer* layer() const; | 125 WebLayer* layer() const; |
125 bool isAccelerated() const; | 126 bool isAccelerated() const; |
126 void setFilterQuality(SkFilterQuality); | 127 void setFilterQuality(SkFilterQuality); |
127 void setIsHidden(bool); | 128 void setIsHidden(bool); |
128 void setImageBuffer(ImageBuffer*); | 129 void setImageBuffer(ImageBuffer*); |
129 void didDraw(const FloatRect&); | 130 void didDraw(const FloatRect&); |
130 bool writePixels(const SkImageInfo&, | 131 bool writePixels(const SkImageInfo&, |
131 const void* pixels, | 132 const void* pixels, |
132 size_t rowBytes, | 133 size_t rowBytes, |
133 int x, | 134 int x, |
134 int y); | 135 int y); |
135 void flush(); | 136 void flush(); |
136 void flushGpu(); | 137 void flushGpu(); |
137 void prepareSurfaceForPaintingIfNeeded(); | |
138 bool isHidden() { return m_isHidden; } | 138 bool isHidden() { return m_isHidden; } |
139 OpacityMode opacityMode() { return m_opacityMode; } | 139 OpacityMode opacityMode() { return m_opacityMode; } |
140 void dontUseIdleSchedulingForTesting() { | 140 void dontUseIdleSchedulingForTesting() { |
141 m_dontUseIdleSchedulingForTesting = true; | 141 m_dontUseIdleSchedulingForTesting = true; |
142 } | 142 } |
143 | 143 |
144 void beginDestruction(); | 144 void beginDestruction(); |
145 void hibernate(); | 145 void hibernate(); |
146 bool isHibernating() const { return m_hibernationImage.get(); } | 146 bool isHibernating() const { return m_hibernationImage.get(); } |
147 sk_sp<SkColorSpace> skSurfaceColorSpace() const; | 147 sk_sp<SkColorSpace> skSurfaceColorSpace() const; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // Each element in this vector represents an IOSurface backed texture that | 303 // Each element in this vector represents an IOSurface backed texture that |
304 // is ready to be reused. | 304 // is ready to be reused. |
305 // Elements in this vector can safely be purged in low memory conditions. | 305 // Elements in this vector can safely be purged in low memory conditions. |
306 Vector<RefPtr<ImageInfo>> m_imageInfoCache; | 306 Vector<RefPtr<ImageInfo>> m_imageInfoCache; |
307 #endif // USE_IOSURFACE_FOR_2D_CANVAS | 307 #endif // USE_IOSURFACE_FOR_2D_CANVAS |
308 }; | 308 }; |
309 | 309 |
310 } // namespace blink | 310 } // namespace blink |
311 | 311 |
312 #endif | 312 #endif |
OLD | NEW |