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

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

Issue 2376743002: Implement commit for unaccelerated canvas with GPU compositing (Closed)
Patch Set: another minor cleanup 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/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
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 setTransferableResourceCase1(cc::TransferableResource&,
Justin Novosad 2016/10/04 14:20:48 These function names have readability issues. You
xidachen 2016/10/04 14:43:06 Done.
54 RefPtr<StaticBitmapImage>);
55 void setTransferableResourceCase2(cc::TransferableResource&,
56 RefPtr<StaticBitmapImage>);
57 void setTransferableResourceCase3(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698