| 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/output/begin_frame_args.h" | 9 #include "cc/output/begin_frame_args.h" |
| 10 #include "cc/resources/shared_bitmap.h" | 10 #include "cc/resources/shared_bitmap.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void reshape(int width, int height) override; | 54 void reshape(int width, int height) override; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 // Surface-related | 57 // Surface-related |
| 58 cc::SurfaceIdAllocator m_surfaceIdAllocator; | 58 cc::SurfaceIdAllocator m_surfaceIdAllocator; |
| 59 const cc::FrameSinkId m_frameSinkId; | 59 const cc::FrameSinkId m_frameSinkId; |
| 60 cc::LocalFrameId m_currentLocalFrameId; | 60 cc::LocalFrameId m_currentLocalFrameId; |
| 61 | 61 |
| 62 int m_width; | 62 int m_width; |
| 63 int m_height; | 63 int m_height; |
| 64 bool m_changeSizeForNextCommit; |
| 64 | 65 |
| 65 unsigned m_nextResourceId; | 66 unsigned m_nextResourceId; |
| 66 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages; | 67 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages; |
| 67 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> m_sharedBitmaps; | 68 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> m_sharedBitmaps; |
| 68 HashMap<unsigned, GLuint> m_cachedTextureIds; | 69 HashMap<unsigned, GLuint> m_cachedTextureIds; |
| 69 HashSet<unsigned> m_spareResourceLocks; | 70 HashSet<unsigned> m_spareResourceLocks; |
| 70 | 71 |
| 71 bool verifyImageSize(const IntSize); | 72 bool verifyImageSize(const IntSize); |
| 72 | 73 |
| 73 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink; | 74 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink; |
| 74 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding; | 75 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding; |
| 75 | 76 |
| 76 int m_placeholderCanvasId; | 77 int m_placeholderCanvasId; |
| 77 | 78 |
| 78 void setTransferableResourceToSharedBitmap(cc::TransferableResource&, | 79 void setTransferableResourceToSharedBitmap(cc::TransferableResource&, |
| 79 RefPtr<StaticBitmapImage>); | 80 RefPtr<StaticBitmapImage>); |
| 80 void setTransferableResourceToSharedGPUContext(cc::TransferableResource&, | 81 void setTransferableResourceToSharedGPUContext(cc::TransferableResource&, |
| 81 RefPtr<StaticBitmapImage>); | 82 RefPtr<StaticBitmapImage>); |
| 82 void setTransferableResourceToStaticBitmapImage(cc::TransferableResource&, | 83 void setTransferableResourceToStaticBitmapImage(cc::TransferableResource&, |
| 83 RefPtr<StaticBitmapImage>); | 84 RefPtr<StaticBitmapImage>); |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 } // namespace blink | 87 } // namespace blink |
| 87 | 88 |
| 88 #endif // OffscreenCanvasFrameDispatcherImpl_h | 89 #endif // OffscreenCanvasFrameDispatcherImpl_h |
| OLD | NEW |