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

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

Issue 2359723003: Implement OffscreenCanvas Accelerated 2D commit() (Closed)
Patch Set: Fix Created 4 years, 2 months 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/surfaces/surface_id.h" 9 #include "cc/surfaces/surface_id.h"
10 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
(...skipping 13 matching lines...) Expand all
24 ~OffscreenCanvasFrameDispatcherImpl() override {} 24 ~OffscreenCanvasFrameDispatcherImpl() override {}
25 void dispatchFrame(RefPtr<StaticBitmapImage>) override; 25 void dispatchFrame(RefPtr<StaticBitmapImage>) override;
26 26
27 // cc::mojom::blink::MojoCompositorFrameSinkClient implementation. 27 // cc::mojom::blink::MojoCompositorFrameSinkClient implementation.
28 void ReturnResources(Vector<cc::mojom::blink::ReturnedResourcePtr> resources ) override; 28 void ReturnResources(Vector<cc::mojom::blink::ReturnedResourcePtr> resources ) override;
29 29
30 private: 30 private:
31 const cc::SurfaceId m_surfaceId; 31 const cc::SurfaceId m_surfaceId;
32 const int m_width; 32 const int m_width;
33 const int m_height; 33 const int m_height;
34
35 unsigned m_nextResourceId;
36 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages;
37
38 bool verifyImageSize(const sk_sp<SkImage>&);
39
34 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink; 40 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink;
35
36 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages;
37 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding; 41 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding;
38 }; 42 };
39 43
40 } // namespace blink 44 } // namespace blink
41 45
42 #endif // OffscreenCanvasFrameDispatcherImpl_h 46 #endif // OffscreenCanvasFrameDispatcherImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698