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

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

Issue 2848553003: Adjust OffscreenCanvas throttling to allow two frames of backlog (Closed)
Patch Set: Created 3 years, 7 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 <memory> 8 #include <memory>
9 #include "cc/ipc/mojo_compositor_frame_sink.mojom-blink.h" 9 #include "cc/ipc/mojo_compositor_frame_sink.mojom-blink.h"
10 #include "cc/output/begin_frame_args.h" 10 #include "cc/output/begin_frame_args.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 private: 57 private:
58 // Surface-related 58 // Surface-related
59 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; 59 cc::LocalSurfaceIdAllocator local_surface_id_allocator_;
60 const cc::FrameSinkId frame_sink_id_; 60 const cc::FrameSinkId frame_sink_id_;
61 cc::LocalSurfaceId current_local_surface_id_; 61 cc::LocalSurfaceId current_local_surface_id_;
62 62
63 int width_; 63 int width_;
64 int height_; 64 int height_;
65 bool change_size_for_next_commit_; 65 bool change_size_for_next_commit_;
66 bool needs_begin_frame_; 66 bool needs_begin_frame_;
67 bool compositor_has_pending_frame_ = false; 67 int compositor_pending_frames_ = 0;
Eric Seckler 2017/04/28 08:19:10 nit: pending_compositor_frames_ ?
68 68
69 unsigned next_resource_id_; 69 unsigned next_resource_id_;
70 HashMap<unsigned, RefPtr<StaticBitmapImage>> cached_images_; 70 HashMap<unsigned, RefPtr<StaticBitmapImage>> cached_images_;
71 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> shared_bitmaps_; 71 HashMap<unsigned, std::unique_ptr<cc::SharedBitmap>> shared_bitmaps_;
72 HashMap<unsigned, GLuint> cached_texture_ids_; 72 HashMap<unsigned, GLuint> cached_texture_ids_;
73 HashSet<unsigned> spare_resource_locks_; 73 HashSet<unsigned> spare_resource_locks_;
74 74
75 bool VerifyImageSize(const IntSize); 75 bool VerifyImageSize(const IntSize);
76 void PostImageToPlaceholder(RefPtr<StaticBitmapImage>); 76 void PostImageToPlaceholder(RefPtr<StaticBitmapImage>);
77 77
78 cc::mojom::blink::MojoCompositorFrameSinkPtr sink_; 78 cc::mojom::blink::MojoCompositorFrameSinkPtr sink_;
79 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> binding_; 79 mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> binding_;
80 80
81 int placeholder_canvas_id_; 81 int placeholder_canvas_id_;
82 82
83 cc::BeginFrameAck current_begin_frame_ack_; 83 cc::BeginFrameAck current_begin_frame_ack_;
84 84
85 void SetTransferableResourceToSharedBitmap(cc::TransferableResource&, 85 void SetTransferableResourceToSharedBitmap(cc::TransferableResource&,
86 RefPtr<StaticBitmapImage>); 86 RefPtr<StaticBitmapImage>);
87 void SetTransferableResourceToSharedGPUContext(cc::TransferableResource&, 87 void SetTransferableResourceToSharedGPUContext(cc::TransferableResource&,
88 RefPtr<StaticBitmapImage>); 88 RefPtr<StaticBitmapImage>);
89 void SetTransferableResourceToStaticBitmapImage(cc::TransferableResource&, 89 void SetTransferableResourceToStaticBitmapImage(cc::TransferableResource&,
90 RefPtr<StaticBitmapImage>); 90 RefPtr<StaticBitmapImage>);
91 }; 91 };
92 92
93 } // namespace blink 93 } // namespace blink
94 94
95 #endif // OffscreenCanvasFrameDispatcherImpl_h 95 #endif // OffscreenCanvasFrameDispatcherImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698