| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void setFilterQuality(SkFilterQuality); | 113 void setFilterQuality(SkFilterQuality); |
| 114 void setIsHidden(bool); | 114 void setIsHidden(bool); |
| 115 void setImageBuffer(ImageBuffer*); | 115 void setImageBuffer(ImageBuffer*); |
| 116 void didDraw(const FloatRect&); | 116 void didDraw(const FloatRect&); |
| 117 bool writePixels(const SkImageInfo&, const void* pixels, size_t rowBytes, in
t x, int y); | 117 bool writePixels(const SkImageInfo&, const void* pixels, size_t rowBytes, in
t x, int y); |
| 118 void flush(); | 118 void flush(); |
| 119 void flushGpu(); | 119 void flushGpu(); |
| 120 void prepareSurfaceForPaintingIfNeeded(); | 120 void prepareSurfaceForPaintingIfNeeded(); |
| 121 bool isHidden() { return m_isHidden; } | 121 bool isHidden() { return m_isHidden; } |
| 122 OpacityMode opacityMode() { return m_opacityMode; } | 122 OpacityMode opacityMode() { return m_opacityMode; } |
| 123 void dontUseIdleSchedulingForTesting() { m_dontUseIdleSchedulingForTesting =
true; } |
| 123 | 124 |
| 124 void beginDestruction(); | 125 void beginDestruction(); |
| 125 void hibernate(); | 126 void hibernate(); |
| 126 bool isHibernating() const { return m_hibernationImage.get(); } | 127 bool isHibernating() const { return m_hibernationImage.get(); } |
| 127 sk_sp<SkColorSpace> colorSpace() const { return m_colorSpace; } | 128 sk_sp<SkColorSpace> colorSpace() const { return m_colorSpace; } |
| 128 | 129 |
| 129 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason); | 130 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason); |
| 130 | 131 |
| 131 // The values of the enum entries must not change because they are used for | 132 // The values of the enum entries must not change because they are used for |
| 132 // usage metrics histograms. New values can be added to the end. | 133 // usage metrics histograms. New values can be added to the end. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 bool m_haveRecordedDrawCommands; | 253 bool m_haveRecordedDrawCommands; |
| 253 bool m_destructionInProgress; | 254 bool m_destructionInProgress; |
| 254 SkFilterQuality m_filterQuality; | 255 SkFilterQuality m_filterQuality; |
| 255 bool m_isHidden; | 256 bool m_isHidden; |
| 256 bool m_isDeferralEnabled; | 257 bool m_isDeferralEnabled; |
| 257 bool m_isRegisteredTaskObserver; | 258 bool m_isRegisteredTaskObserver; |
| 258 bool m_renderingTaskCompletedForCurrentFrame; | 259 bool m_renderingTaskCompletedForCurrentFrame; |
| 259 bool m_softwareRenderingWhileHidden; | 260 bool m_softwareRenderingWhileHidden; |
| 260 bool m_surfaceCreationFailedAtLeastOnce = false; | 261 bool m_surfaceCreationFailedAtLeastOnce = false; |
| 261 bool m_hibernationScheduled = false; | 262 bool m_hibernationScheduled = false; |
| 263 bool m_dontUseIdleSchedulingForTesting = false; |
| 262 | 264 |
| 263 friend class Canvas2DLayerBridgeTest; | 265 friend class Canvas2DLayerBridgeTest; |
| 264 friend class CanvasRenderingContext2DTest; | 266 friend class CanvasRenderingContext2DTest; |
| 265 friend class HTMLCanvasPainterTestForSPv2; | 267 friend class HTMLCanvasPainterTestForSPv2; |
| 266 | 268 |
| 267 uint32_t m_lastImageId; | 269 uint32_t m_lastImageId; |
| 268 | 270 |
| 269 enum { | 271 enum { |
| 270 // We should normally not have more that two active mailboxes at a time, | 272 // We should normally not have more that two active mailboxes at a time, |
| 271 // but sometime we may have three due to the async nature of mailbox han
dling. | 273 // but sometime we may have three due to the async nature of mailbox han
dling. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 284 // Each element in this vector represents an IOSurface backed texture that | 286 // Each element in this vector represents an IOSurface backed texture that |
| 285 // is ready to be reused. | 287 // is ready to be reused. |
| 286 // Elements in this vector can safely be purged in low memory conditions. | 288 // Elements in this vector can safely be purged in low memory conditions. |
| 287 Vector<ImageInfo> m_imageInfoCache; | 289 Vector<ImageInfo> m_imageInfoCache; |
| 288 #endif // USE_IOSURFACE_FOR_2D_CANVAS | 290 #endif // USE_IOSURFACE_FOR_2D_CANVAS |
| 289 }; | 291 }; |
| 290 | 292 |
| 291 } // namespace blink | 293 } // namespace blink |
| 292 | 294 |
| 293 #endif | 295 #endif |
| OLD | NEW |