OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef OffscreenCanvasFrameDispatcherImpl_h | 5 #ifndef OffscreenCanvasFrameDispatcherImpl_h |
6 #define OffscreenCanvasFrameDispatcherImpl_h | 6 #define OffscreenCanvasFrameDispatcherImpl_h |
7 | 7 |
8 #include "cc/ipc/mojo_compositor_frame_sink.mojom-blink.h" | 8 #include "cc/ipc/mojo_compositor_frame_sink.mojom-blink.h" |
9 #include "cc/resources/shared_bitmap.h" | 9 #include "cc/resources/shared_bitmap.h" |
10 #include "cc/surfaces/surface_id.h" | 10 #include "cc/surfaces/surface_id.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // cc::mojom::blink::MojoCompositorFrameSinkClient implementation. | 34 // cc::mojom::blink::MojoCompositorFrameSinkClient implementation. |
35 void ReturnResources( | 35 void ReturnResources( |
36 Vector<cc::mojom::blink::ReturnedResourcePtr> resources) override; | 36 Vector<cc::mojom::blink::ReturnedResourcePtr> resources) override; |
37 | 37 |
38 private: | 38 private: |
39 const cc::SurfaceId m_surfaceId; | 39 const cc::SurfaceId m_surfaceId; |
40 const int m_width; | 40 const int m_width; |
41 const int m_height; | 41 const int m_height; |
42 | 42 |
43 unsigned m_nextResourceId; | 43 unsigned m_nextResourceId; |
44 unsigned getNextResourceIdAndIncrement() { return m_nextResourceId++; } | |
45 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages; | 44 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages; |
46 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> m_sharedBitmaps; | 45 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> m_sharedBitmaps; |
| 46 HashMap<unsigned, GLuint> m_cachedTextureIds; |
47 | 47 |
48 bool verifyImageSize(const sk_sp<SkImage>&); | 48 bool verifyImageSize(const sk_sp<SkImage>&); |
49 | 49 |
50 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink; | 50 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink; |
51 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding; | 51 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding; |
| 52 |
| 53 void setTransferableResourceInMemory(cc::TransferableResource&, |
| 54 RefPtr<StaticBitmapImage>); |
| 55 void setTransferableResourceMemoryToTexture(cc::TransferableResource&, |
| 56 RefPtr<StaticBitmapImage>); |
| 57 void setTransferableResourceInTexture(cc::TransferableResource&, |
| 58 RefPtr<StaticBitmapImage>); |
52 }; | 59 }; |
53 | 60 |
54 } // namespace blink | 61 } // namespace blink |
55 | 62 |
56 #endif // OffscreenCanvasFrameDispatcherImpl_h | 63 #endif // OffscreenCanvasFrameDispatcherImpl_h |
OLD | NEW |