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

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

Issue 2400223002: Add UMA metrics to OffscreenCanvas's commit type (Closed)
Patch Set: remove an unnecessary include line 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 19 matching lines...) Expand all
30 30
31 // OffscreenCanvasFrameDispatcher implementation. 31 // OffscreenCanvasFrameDispatcher implementation.
32 ~OffscreenCanvasFrameDispatcherImpl() override {} 32 ~OffscreenCanvasFrameDispatcherImpl() override {}
33 void dispatchFrame(RefPtr<StaticBitmapImage>, 33 void dispatchFrame(RefPtr<StaticBitmapImage>,
34 bool isWebGLSoftwareRendering = false) override; 34 bool isWebGLSoftwareRendering = false) override;
35 35
36 // cc::mojom::blink::MojoCompositorFrameSinkClient implementation. 36 // cc::mojom::blink::MojoCompositorFrameSinkClient implementation.
37 void ReturnResources( 37 void ReturnResources(
38 Vector<cc::mojom::blink::ReturnedResourcePtr> resources) override; 38 Vector<cc::mojom::blink::ReturnedResourcePtr> resources) override;
39 39
40 enum OffscreenCanvasCommitType {
Ilya Sherman 2016/10/11 00:54:11 Please document that this enum is used to back an
xidachen 2016/10/11 17:21:16 Done.
41 CommitGPUCanvasGPUCompositing = 0,
42 CommitGPUCanvasSoftwareCompositing = 1,
43 CommitSoftwareCanvasGPUCompositing = 2,
44 CommitSoftwareCanvasSoftwareCompositing = 3,
45 OffscreenCanvasCommitTypeCount,
46 };
47
40 private: 48 private:
41 const cc::SurfaceId m_surfaceId; 49 const cc::SurfaceId m_surfaceId;
42 const int m_width; 50 const int m_width;
43 const int m_height; 51 const int m_height;
44 52
45 unsigned m_nextResourceId; 53 unsigned m_nextResourceId;
46 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages; 54 HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages;
47 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> m_sharedBitmaps; 55 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> m_sharedBitmaps;
48 HashMap<unsigned, GLuint> m_cachedTextureIds; 56 HashMap<unsigned, GLuint> m_cachedTextureIds;
49 57
50 bool verifyImageSize(const sk_sp<SkImage>&); 58 bool verifyImageSize(const sk_sp<SkImage>&);
51 59
52 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink; 60 cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink;
53 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding; 61 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding;
54 62
55 void setTransferableResourceInMemory(cc::TransferableResource&, 63 void setTransferableResourceInMemory(cc::TransferableResource&,
56 RefPtr<StaticBitmapImage>); 64 RefPtr<StaticBitmapImage>);
57 void setTransferableResourceMemoryToTexture(cc::TransferableResource&, 65 void setTransferableResourceMemoryToTexture(cc::TransferableResource&,
58 RefPtr<StaticBitmapImage>); 66 RefPtr<StaticBitmapImage>);
59 void setTransferableResourceInTexture(cc::TransferableResource&, 67 void setTransferableResourceInTexture(cc::TransferableResource&,
60 RefPtr<StaticBitmapImage>); 68 RefPtr<StaticBitmapImage>);
61 }; 69 };
62 70
63 } // namespace blink 71 } // namespace blink
64 72
65 #endif // OffscreenCanvasFrameDispatcherImpl_h 73 #endif // OffscreenCanvasFrameDispatcherImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698