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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class Canvas2DLayerBridgeTest; | 46 class Canvas2DLayerBridgeTest; |
47 class ImageBuffer; | 47 class ImageBuffer; |
48 class WebGraphicsContext3D; | 48 class WebGraphicsContext3D; |
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 ~Canvas2DLayerBridge() override; |
57 | 57 |
58 // WebExternalTextureLayerClient implementation. | 58 // WebExternalTextureLayerClient implementation. |
59 virtual bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*)
override; | 59 bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*) override
; |
60 virtual void mailboxReleased(const WebExternalTextureMailbox&, bool lostReso
urce) override; | 60 void mailboxReleased(const WebExternalTextureMailbox&, bool lostResource) ov
erride; |
61 | 61 |
62 // SkDeferredCanvas::NotificationClient implementation | 62 // SkDeferredCanvas::NotificationClient implementation |
63 virtual void prepareForDraw() override; | 63 void prepareForDraw() override; |
64 virtual void storageAllocatedForRecordingChanged(size_t) override; | 64 void storageAllocatedForRecordingChanged(size_t) override; |
65 virtual void flushedDrawCommands() override; | 65 void flushedDrawCommands() override; |
66 virtual void skippedPendingDrawCommands() override; | 66 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 bool isAccelerated() const { return true; } | 75 bool isAccelerated() const { return true; } |
76 void setFilterQuality(SkFilterQuality); | 76 void setFilterQuality(SkFilterQuality); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 }; | 136 }; |
137 | 137 |
138 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes; | 138 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes; |
139 GLenum m_lastFilter; | 139 GLenum m_lastFilter; |
140 OpacityMode m_opacityMode; | 140 OpacityMode m_opacityMode; |
141 }; | 141 }; |
142 | 142 |
143 } // namespace blink | 143 } // namespace blink |
144 | 144 |
145 #endif | 145 #endif |
OLD | NEW |