Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h

Issue 2588053003: Make OffscreenCanvas resizable (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698