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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // ImageBufferSurface implementation | 68 // ImageBufferSurface implementation |
69 void finalizeFrame(const FloatRect &dirtyRect); | 69 void finalizeFrame(const FloatRect &dirtyRect); |
70 void willAccessPixels(); | 70 void willAccessPixels(); |
71 SkCanvas* canvas() const { return m_canvas.get(); } | 71 SkCanvas* canvas() const { return m_canvas.get(); } |
72 bool checkSurfaceValid(); | 72 bool checkSurfaceValid(); |
73 bool restoreSurface(); | 73 bool restoreSurface(); |
74 WebLayer* layer() const; | 74 WebLayer* layer() const; |
75 Platform3DObject getBackingTexture(); | 75 Platform3DObject getBackingTexture(); |
76 bool isAccelerated() const { return true; } | 76 bool isAccelerated() const { return true; } |
| 77 void setNearestNeighbor(bool); |
77 void setIsHidden(bool); | 78 void setIsHidden(bool); |
78 void setImageBuffer(ImageBuffer* imageBuffer) { m_imageBuffer = imageBuffer;
} | 79 void setImageBuffer(ImageBuffer* imageBuffer) { m_imageBuffer = imageBuffer;
} |
79 | 80 |
80 // Methods used by Canvas2DLayerManager | 81 // Methods used by Canvas2DLayerManager |
81 virtual size_t freeMemoryIfPossible(size_t); // virtual for mocking | 82 virtual size_t freeMemoryIfPossible(size_t); // virtual for mocking |
82 virtual void flush(); // virtual for mocking | 83 virtual void flush(); // virtual for mocking |
83 virtual size_t storageAllocatedForRecording(); // virtual for faking | 84 virtual size_t storageAllocatedForRecording(); // virtual for faking |
84 size_t bytesAllocated() const { return m_bytesAllocated; } | 85 size_t bytesAllocated() const { return m_bytesAllocated; } |
85 void limitPendingFrames(); | 86 void limitPendingFrames(); |
86 void freeReleasedMailbox(); | 87 void freeReleasedMailbox(); |
(...skipping 16 matching lines...) Expand all Loading... |
103 OwnPtr<WebGraphicsContext3DProvider> m_contextProvider; | 104 OwnPtr<WebGraphicsContext3DProvider> m_contextProvider; |
104 ImageBuffer* m_imageBuffer; | 105 ImageBuffer* m_imageBuffer; |
105 int m_msaaSampleCount; | 106 int m_msaaSampleCount; |
106 size_t m_bytesAllocated; | 107 size_t m_bytesAllocated; |
107 bool m_didRecordDrawCommand; | 108 bool m_didRecordDrawCommand; |
108 bool m_isSurfaceValid; | 109 bool m_isSurfaceValid; |
109 int m_framesPending; | 110 int m_framesPending; |
110 int m_framesSinceMailboxRelease; | 111 int m_framesSinceMailboxRelease; |
111 bool m_destructionInProgress; | 112 bool m_destructionInProgress; |
112 bool m_rateLimitingEnabled; | 113 bool m_rateLimitingEnabled; |
| 114 bool m_nearestNeighbor; |
113 bool m_isHidden; | 115 bool m_isHidden; |
114 | 116 |
115 friend class WTF::DoublyLinkedListNode<Canvas2DLayerBridge>; | 117 friend class WTF::DoublyLinkedListNode<Canvas2DLayerBridge>; |
116 friend class ::Canvas2DLayerBridgeTest; | 118 friend class ::Canvas2DLayerBridgeTest; |
117 Canvas2DLayerBridge* m_next; | 119 Canvas2DLayerBridge* m_next; |
118 Canvas2DLayerBridge* m_prev; | 120 Canvas2DLayerBridge* m_prev; |
119 | 121 |
120 enum MailboxStatus { | 122 enum MailboxStatus { |
121 MailboxInUse, | 123 MailboxInUse, |
122 MailboxReleased, | 124 MailboxReleased, |
(...skipping 13 matching lines...) Expand all Loading... |
136 MailboxInfo* releasedMailboxInfo(); | 138 MailboxInfo* releasedMailboxInfo(); |
137 | 139 |
138 uint32_t m_lastImageId; | 140 uint32_t m_lastImageId; |
139 Vector<MailboxInfo> m_mailboxes; | 141 Vector<MailboxInfo> m_mailboxes; |
140 int m_releasedMailboxInfoIndex; | 142 int m_releasedMailboxInfoIndex; |
141 }; | 143 }; |
142 | 144 |
143 } // namespace blink | 145 } // namespace blink |
144 | 146 |
145 #endif | 147 #endif |
OLD | NEW |