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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 class WebGraphicsContext3DProvider; | 49 class WebGraphicsContext3DProvider; |
50 | 50 |
51 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient
, public SkDeferredCanvas::NotificationClient, public DoublyLinkedListNode<Canva
s2DLayerBridge>, public RefCounted<Canvas2DLayerBridge> { | 51 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient
, public SkDeferredCanvas::NotificationClient, public DoublyLinkedListNode<Canva
s2DLayerBridge>, public RefCounted<Canvas2DLayerBridge> { |
52 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); | 52 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); |
53 public: | 53 public: |
54 static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, OpacityMode, i
nt msaaSampleCount); | 54 static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, OpacityMode, i
nt msaaSampleCount); |
55 | 55 |
56 virtual ~Canvas2DLayerBridge(); | 56 virtual ~Canvas2DLayerBridge(); |
57 | 57 |
58 // WebExternalTextureLayerClient implementation. | 58 // WebExternalTextureLayerClient implementation. |
59 virtual bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*)
OVERRIDE; | 59 virtual bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*)
override; |
60 virtual void mailboxReleased(const WebExternalTextureMailbox&, bool lostReso
urce) OVERRIDE; | 60 virtual void mailboxReleased(const WebExternalTextureMailbox&, bool lostReso
urce) override; |
61 | 61 |
62 // SkDeferredCanvas::NotificationClient implementation | 62 // SkDeferredCanvas::NotificationClient implementation |
63 virtual void prepareForDraw() OVERRIDE; | 63 virtual void prepareForDraw() override; |
64 virtual void storageAllocatedForRecordingChanged(size_t) OVERRIDE; | 64 virtual void storageAllocatedForRecordingChanged(size_t) override; |
65 virtual void flushedDrawCommands() OVERRIDE; | 65 virtual void flushedDrawCommands() override; |
66 virtual void skippedPendingDrawCommands() OVERRIDE; | 66 virtual void skippedPendingDrawCommands() override; |
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; } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 MailboxInfo* releasedMailboxInfo(); | 138 MailboxInfo* releasedMailboxInfo(); |
139 | 139 |
140 uint32_t m_lastImageId; | 140 uint32_t m_lastImageId; |
141 Vector<MailboxInfo> m_mailboxes; | 141 Vector<MailboxInfo> m_mailboxes; |
142 int m_releasedMailboxInfoIndex; | 142 int m_releasedMailboxInfoIndex; |
143 }; | 143 }; |
144 | 144 |
145 } // namespace blink | 145 } // namespace blink |
146 | 146 |
147 #endif | 147 #endif |
OLD | NEW |