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

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

Issue 2517343003: Update Resize information from OffscreenCanvas to OffscreenCanvasFrameDispatcher (Closed)
Patch Set: fix error 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // This enum is used in histogram, so it should be append-only. 46 // This enum is used in histogram, so it should be append-only.
47 enum OffscreenCanvasCommitType { 47 enum OffscreenCanvasCommitType {
48 CommitGPUCanvasGPUCompositing = 0, 48 CommitGPUCanvasGPUCompositing = 0,
49 CommitGPUCanvasSoftwareCompositing = 1, 49 CommitGPUCanvasSoftwareCompositing = 1,
50 CommitSoftwareCanvasGPUCompositing = 2, 50 CommitSoftwareCanvasGPUCompositing = 2,
51 CommitSoftwareCanvasSoftwareCompositing = 3, 51 CommitSoftwareCanvasSoftwareCompositing = 3,
52 OffscreenCanvasCommitTypeCount, 52 OffscreenCanvasCommitTypeCount,
53 }; 53 };
54 54
55 void reshape(int width, int height) override;
56
55 private: 57 private:
56 const cc::SurfaceId m_surfaceId; 58 const cc::FrameSinkId m_frameSinkId;
57 const int m_width; 59 cc::LocalFrameId m_currentLocalFrameId;
58 const int m_height; 60 int m_width;
61 int m_height;
59 62
60 unsigned m_nextResourceId; 63 unsigned m_nextResourceId;
61 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages; 64 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages;
62 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> m_sharedBitmaps; 65 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> m_sharedBitmaps;
63 HashMap<unsigned, GLuint> m_cachedTextureIds; 66 HashMap<unsigned, GLuint> m_cachedTextureIds;
64 HashSet<unsigned> m_spareResourceLocks; 67 HashSet<unsigned> m_spareResourceLocks;
65 68
66 bool verifyImageSize(const IntSize); 69 bool verifyImageSize(const IntSize);
67 70
68 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink; 71 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink;
69 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding; 72 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding;
70 73
71 int m_placeholderCanvasId; 74 int m_placeholderCanvasId;
72 75
73 void setTransferableResourceToSharedBitmap(cc::TransferableResource&, 76 void setTransferableResourceToSharedBitmap(cc::TransferableResource&,
74 RefPtr<StaticBitmapImage>); 77 RefPtr<StaticBitmapImage>);
75 void setTransferableResourceToSharedGPUContext(cc::TransferableResource&, 78 void setTransferableResourceToSharedGPUContext(cc::TransferableResource&,
76 RefPtr<StaticBitmapImage>); 79 RefPtr<StaticBitmapImage>);
77 void setTransferableResourceToStaticBitmapImage(cc::TransferableResource&, 80 void setTransferableResourceToStaticBitmapImage(cc::TransferableResource&,
78 RefPtr<StaticBitmapImage>); 81 RefPtr<StaticBitmapImage>);
79 }; 82 };
80 83
81 } // namespace blink 84 } // namespace blink
82 85
83 #endif // OffscreenCanvasFrameDispatcherImpl_h 86 #endif // OffscreenCanvasFrameDispatcherImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698