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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // WebExternalTextureLayerClient implementation. | 69 // WebExternalTextureLayerClient implementation. |
70 bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*) override
; | 70 bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*) override
; |
71 void mailboxReleased(const WebExternalTextureMailbox&, bool lostResource) ov
erride; | 71 void mailboxReleased(const WebExternalTextureMailbox&, bool lostResource) ov
erride; |
72 | 72 |
73 // ImageBufferSurface implementation | 73 // ImageBufferSurface implementation |
74 void finalizeFrame(const FloatRect &dirtyRect); | 74 void finalizeFrame(const FloatRect &dirtyRect); |
75 void willWritePixels(); | 75 void willWritePixels(); |
76 void willOverwriteAllPixels(); | 76 void willOverwriteAllPixels(); |
77 void willOverwriteCanvas(); | 77 void willOverwriteCanvas(); |
78 SkCanvas* canvas(); | 78 SkCanvas* canvas(); |
79 void disableDeferral(); | 79 void disableDeferral(DisableDeferralReason); |
80 bool checkSurfaceValid(); | 80 bool checkSurfaceValid(); |
81 bool restoreSurface(); | 81 bool restoreSurface(); |
82 WebLayer* layer() const; | 82 WebLayer* layer() const; |
83 bool isAccelerated() const; | 83 bool isAccelerated() const; |
84 void setFilterQuality(SkFilterQuality); | 84 void setFilterQuality(SkFilterQuality); |
85 void setIsHidden(bool); | 85 void setIsHidden(bool); |
86 void setImageBuffer(ImageBuffer*); | 86 void setImageBuffer(ImageBuffer*); |
87 void didDraw(const FloatRect&); | 87 void didDraw(const FloatRect&); |
88 bool writePixels(const SkImageInfo&, const void* pixels, size_t rowBytes, in
t x, int y); | 88 bool writePixels(const SkImageInfo&, const void* pixels, size_t rowBytes, in
t x, int y); |
89 void flush(); | 89 void flush(); |
90 void flushGpu(); | 90 void flushGpu(); |
91 void prepareSurfaceForPaintingIfNeeded(); | 91 void prepareSurfaceForPaintingIfNeeded(); |
92 bool isHidden() { return m_isHidden; } | 92 bool isHidden() { return m_isHidden; } |
93 | 93 |
94 void beginDestruction(); | 94 void beginDestruction(); |
95 void hibernate(); | 95 void hibernate(); |
96 bool isHibernating() const { return m_hibernationImage; } | 96 bool isHibernating() const { return m_hibernationImage; } |
97 | 97 |
98 PassRefPtr<SkImage> newImageSnapshot(AccelerationHint); | 98 PassRefPtr<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason); |
99 | 99 |
100 // The values of the enum entries must not change because they are used for | 100 // The values of the enum entries must not change because they are used for |
101 // usage metrics histograms. New values can be added to the end. | 101 // usage metrics histograms. New values can be added to the end. |
102 enum HibernationEvent { | 102 enum HibernationEvent { |
103 HibernationScheduled = 0, | 103 HibernationScheduled = 0, |
104 HibernationAbortedDueToDestructionWhileHibernatePending = 1, | 104 HibernationAbortedDueToDestructionWhileHibernatePending = 1, |
105 HibernationAbortedDueToPendingDestruction = 2, | 105 HibernationAbortedDueToPendingDestruction = 2, |
106 HibernationAbortedDueToVisibilityChange = 3, | 106 HibernationAbortedDueToVisibilityChange = 3, |
107 HibernationAbortedDueGpuContextLoss = 4, | 107 HibernationAbortedDueGpuContextLoss = 4, |
108 HibernationAbortedDueToSwitchToUnacceleratedRendering = 5, | 108 HibernationAbortedDueToSwitchToUnacceleratedRendering = 5, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 GLenum m_lastFilter; | 187 GLenum m_lastFilter; |
188 AccelerationMode m_accelerationMode; | 188 AccelerationMode m_accelerationMode; |
189 OpacityMode m_opacityMode; | 189 OpacityMode m_opacityMode; |
190 IntSize m_size; | 190 IntSize m_size; |
191 int m_recordingPixelCount; | 191 int m_recordingPixelCount; |
192 }; | 192 }; |
193 | 193 |
194 } // namespace blink | 194 } // namespace blink |
195 | 195 |
196 #endif | 196 #endif |
OLD | NEW |