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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 // ImageBufferSurface implementation | 69 // ImageBufferSurface implementation |
70 void finalizeFrame(const FloatRect &dirtyRect); | 70 void finalizeFrame(const FloatRect &dirtyRect); |
71 void willAccessPixels(); | 71 void willAccessPixels(); |
72 SkCanvas* canvas() const { return m_canvas.get(); } | 72 SkCanvas* canvas() const { return m_canvas.get(); } |
73 bool checkSurfaceValid(); | 73 bool checkSurfaceValid(); |
74 bool restoreSurface(); | 74 bool restoreSurface(); |
75 WebLayer* layer() const; | 75 WebLayer* layer() const; |
76 Platform3DObject getBackingTexture(); | 76 Platform3DObject getBackingTexture(); |
77 bool isAccelerated() const { return true; } | 77 bool isAccelerated() const { return true; } |
78 void setFilterLevel(SkPaint::FilterLevel); | 78 void setFilterQuality(SkFilterQuality); |
79 void setIsHidden(bool); | 79 void setIsHidden(bool); |
80 void setImageBuffer(ImageBuffer* imageBuffer) { m_imageBuffer = imageBuffer;
} | 80 void setImageBuffer(ImageBuffer* imageBuffer) { m_imageBuffer = imageBuffer;
} |
81 | 81 |
82 // Methods used by Canvas2DLayerManager | 82 // Methods used by Canvas2DLayerManager |
83 virtual size_t freeMemoryIfPossible(size_t); // virtual for mocking | 83 virtual size_t freeMemoryIfPossible(size_t); // virtual for mocking |
84 virtual void flush(); // virtual for mocking | 84 virtual void flush(); // virtual for mocking |
85 virtual size_t storageAllocatedForRecording(); // virtual for faking | 85 virtual size_t storageAllocatedForRecording(); // virtual for faking |
86 size_t bytesAllocated() const { return m_bytesAllocated; } | 86 size_t bytesAllocated() const { return m_bytesAllocated; } |
87 void limitPendingFrames(); | 87 void limitPendingFrames(); |
88 void freeTransientResources(); | 88 void freeTransientResources(); |
(...skipping 15 matching lines...) Expand all Loading... |
104 OwnPtr<WebGraphicsContext3DProvider> m_contextProvider; | 104 OwnPtr<WebGraphicsContext3DProvider> m_contextProvider; |
105 ImageBuffer* m_imageBuffer; | 105 ImageBuffer* m_imageBuffer; |
106 int m_msaaSampleCount; | 106 int m_msaaSampleCount; |
107 size_t m_bytesAllocated; | 107 size_t m_bytesAllocated; |
108 bool m_didRecordDrawCommand; | 108 bool m_didRecordDrawCommand; |
109 bool m_isSurfaceValid; | 109 bool m_isSurfaceValid; |
110 int m_framesPending; | 110 int m_framesPending; |
111 int m_framesSinceMailboxRelease; | 111 int m_framesSinceMailboxRelease; |
112 bool m_destructionInProgress; | 112 bool m_destructionInProgress; |
113 bool m_rateLimitingEnabled; | 113 bool m_rateLimitingEnabled; |
114 SkPaint::FilterLevel m_filterLevel; | 114 SkFilterQuality m_filterQuality; |
115 bool m_isHidden; | 115 bool m_isHidden; |
116 | 116 |
117 friend class WTF::DoublyLinkedListNode<Canvas2DLayerBridge>; | 117 friend class WTF::DoublyLinkedListNode<Canvas2DLayerBridge>; |
118 friend class ::Canvas2DLayerBridgeTest; | 118 friend class ::Canvas2DLayerBridgeTest; |
119 Canvas2DLayerBridge* m_next; | 119 Canvas2DLayerBridge* m_next; |
120 Canvas2DLayerBridge* m_prev; | 120 Canvas2DLayerBridge* m_prev; |
121 | 121 |
122 struct MailboxInfo { | 122 struct MailboxInfo { |
123 WebExternalTextureMailbox m_mailbox; | 123 WebExternalTextureMailbox m_mailbox; |
124 RefPtr<SkImage> m_image; | 124 RefPtr<SkImage> m_image; |
(...skipping 12 matching lines...) Expand all Loading... |
137 }; | 137 }; |
138 | 138 |
139 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes; | 139 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes; |
140 GLenum m_lastFilter; | 140 GLenum m_lastFilter; |
141 OpacityMode m_opacityMode; | 141 OpacityMode m_opacityMode; |
142 }; | 142 }; |
143 | 143 |
144 } // namespace blink | 144 } // namespace blink |
145 | 145 |
146 #endif | 146 #endif |
OLD | NEW |