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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // SkDeferredCanvas::NotificationClient implementation | 64 // SkDeferredCanvas::NotificationClient implementation |
65 virtual void prepareForDraw() OVERRIDE; | 65 virtual void prepareForDraw() OVERRIDE; |
66 virtual void storageAllocatedForRecordingChanged(size_t) OVERRIDE; | 66 virtual void storageAllocatedForRecordingChanged(size_t) OVERRIDE; |
67 virtual void flushedDrawCommands() OVERRIDE; | 67 virtual void flushedDrawCommands() OVERRIDE; |
68 virtual void skippedPendingDrawCommands() OVERRIDE; | 68 virtual void skippedPendingDrawCommands() OVERRIDE; |
69 | 69 |
70 // ImageBufferSurface implementation | 70 // ImageBufferSurface implementation |
71 void willUse(); | 71 void willUse(); |
72 SkCanvas* canvas() const { return m_canvas.get(); } | 72 SkCanvas* canvas() const { return m_canvas.get(); } |
73 bool isValid(); | 73 bool surfaceIsValid(); |
| 74 bool recoverSurface(); |
74 blink::WebLayer* layer() const; | 75 blink::WebLayer* layer() const; |
75 Platform3DObject getBackingTexture(); | 76 Platform3DObject getBackingTexture(); |
76 bool isAccelerated() const { return true; } | 77 bool isAccelerated() const { return true; } |
77 void setIsHidden(bool); | 78 void setIsHidden(bool); |
78 | 79 |
79 // Methods used by Canvas2DLayerManager | 80 // Methods used by Canvas2DLayerManager |
80 virtual size_t freeMemoryIfPossible(size_t); // virtual for mocking | 81 virtual size_t freeMemoryIfPossible(size_t); // virtual for mocking |
81 virtual void flush(); // virtual for mocking | 82 virtual void flush(); // virtual for mocking |
82 virtual size_t storageAllocatedForRecording(); // virtual for faking | 83 virtual size_t storageAllocatedForRecording(); // virtual for faking |
83 size_t bytesAllocated() const { return m_bytesAllocated; } | 84 size_t bytesAllocated() const { return m_bytesAllocated; } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 }; | 131 }; |
131 MailboxInfo* createMailboxInfo(); | 132 MailboxInfo* createMailboxInfo(); |
132 MailboxInfo* releasedMailboxInfo(); | 133 MailboxInfo* releasedMailboxInfo(); |
133 | 134 |
134 uint32_t m_lastImageId; | 135 uint32_t m_lastImageId; |
135 Vector<MailboxInfo> m_mailboxes; | 136 Vector<MailboxInfo> m_mailboxes; |
136 int m_releasedMailboxInfoIndex; | 137 int m_releasedMailboxInfoIndex; |
137 }; | 138 }; |
138 } | 139 } |
139 #endif | 140 #endif |
OLD | NEW |