| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 void setImageBuffer(ImageBuffer*); | 109 void setImageBuffer(ImageBuffer*); |
| 110 void didDraw(const FloatRect&); | 110 void didDraw(const FloatRect&); |
| 111 bool writePixels(const SkImageInfo&, const void* pixels, size_t rowBytes, in
t x, int y); | 111 bool writePixels(const SkImageInfo&, const void* pixels, size_t rowBytes, in
t x, int y); |
| 112 void flush(); | 112 void flush(); |
| 113 void flushGpu(); | 113 void flushGpu(); |
| 114 void prepareSurfaceForPaintingIfNeeded(); | 114 void prepareSurfaceForPaintingIfNeeded(); |
| 115 bool isHidden() { return m_isHidden; } | 115 bool isHidden() { return m_isHidden; } |
| 116 | 116 |
| 117 void beginDestruction(); | 117 void beginDestruction(); |
| 118 void hibernate(); | 118 void hibernate(); |
| 119 bool isHibernating() const { return m_hibernationImage; } | 119 bool isHibernating() const { return m_hibernationImage.get(); } |
| 120 | 120 |
| 121 PassRefPtr<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason); | 121 PassRefPtr<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason); |
| 122 | 122 |
| 123 // The values of the enum entries must not change because they are used for | 123 // The values of the enum entries must not change because they are used for |
| 124 // usage metrics histograms. New values can be added to the end. | 124 // usage metrics histograms. New values can be added to the end. |
| 125 enum HibernationEvent { | 125 enum HibernationEvent { |
| 126 HibernationScheduled = 0, | 126 HibernationScheduled = 0, |
| 127 HibernationAbortedDueToDestructionWhileHibernatePending = 1, | 127 HibernationAbortedDueToDestructionWhileHibernatePending = 1, |
| 128 HibernationAbortedDueToPendingDestruction = 2, | 128 HibernationAbortedDueToPendingDestruction = 2, |
| 129 HibernationAbortedDueToVisibilityChange = 3, | 129 HibernationAbortedDueToVisibilityChange = 3, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // Each element in this vector represents an IOSurface backed texture that | 277 // Each element in this vector represents an IOSurface backed texture that |
| 278 // is ready to be reused. | 278 // is ready to be reused. |
| 279 // Elements in this vector can safely be purged in low memory conditions. | 279 // Elements in this vector can safely be purged in low memory conditions. |
| 280 Vector<ImageInfo> m_imageInfoCache; | 280 Vector<ImageInfo> m_imageInfoCache; |
| 281 #endif // USE_IOSURFACE_FOR_2D_CANVAS | 281 #endif // USE_IOSURFACE_FOR_2D_CANVAS |
| 282 }; | 282 }; |
| 283 | 283 |
| 284 } // namespace blink | 284 } // namespace blink |
| 285 | 285 |
| 286 #endif | 286 #endif |
| OLD | NEW |