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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 780133002: Add optimization for CHROMIUM_subscribe_uniform extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: piman@ review Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 namespace cc { 55 namespace cc {
56 class CompositorFrame; 56 class CompositorFrame;
57 class CompositorFrameAck; 57 class CompositorFrameAck;
58 } 58 }
59 59
60 namespace gfx { 60 namespace gfx {
61 class Range; 61 class Range;
62 } 62 }
63 63
64 namespace gpu {
65 union ValueState;
66 class ValueStateMap;
67 }
68
64 namespace ui { 69 namespace ui {
65 class KeyEvent; 70 class KeyEvent;
66 } 71 }
67 72
68 namespace blink { 73 namespace blink {
69 class WebInputEvent; 74 class WebInputEvent;
70 class WebMouseEvent; 75 class WebMouseEvent;
71 struct WebCompositionUnderline; 76 struct WebCompositionUnderline;
72 struct WebScreenInfo; 77 struct WebScreenInfo;
73 } 78 }
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 gfx::Size snapshot_size, 471 gfx::Size snapshot_size,
467 scoped_refptr<base::RefCountedBytes> png_data); 472 scoped_refptr<base::RefCountedBytes> png_data);
468 473
469 // LatencyComponents generated in the renderer must have component IDs 474 // LatencyComponents generated in the renderer must have component IDs
470 // provided to them by the browser process. This function adds the correct 475 // provided to them by the browser process. This function adds the correct
471 // component ID where necessary. 476 // component ID where necessary.
472 void AddLatencyInfoComponentIds(ui::LatencyInfo* latency_info); 477 void AddLatencyInfoComponentIds(ui::LatencyInfo* latency_info);
473 478
474 InputRouter* input_router() { return input_router_.get(); } 479 InputRouter* input_router() { return input_router_.get(); }
475 480
481 // Handlers for subscription target changes to update subscription_set_
482 void OnAddSubscription(unsigned int target);
483 void OnRemoveSubscription(unsigned int target);
484
476 // Get the BrowserAccessibilityManager for the root of the frame tree, 485 // Get the BrowserAccessibilityManager for the root of the frame tree,
477 BrowserAccessibilityManager* GetRootBrowserAccessibilityManager(); 486 BrowserAccessibilityManager* GetRootBrowserAccessibilityManager();
478 487
479 // Get the BrowserAccessibilityManager for the root of the frame tree, 488 // Get the BrowserAccessibilityManager for the root of the frame tree,
480 // or create it if it doesn't already exist. 489 // or create it if it doesn't already exist.
481 BrowserAccessibilityManager* GetOrCreateRootBrowserAccessibilityManager(); 490 BrowserAccessibilityManager* GetOrCreateRootBrowserAccessibilityManager();
482 491
483 #if defined(OS_WIN) 492 #if defined(OS_WIN)
484 gfx::NativeViewAccessible GetParentNativeViewAccessible(); 493 gfx::NativeViewAccessible GetParentNativeViewAccessible();
485 #endif 494 #endif
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 void WindowSnapshotReachedScreen(int snapshot_id); 699 void WindowSnapshotReachedScreen(int snapshot_id);
691 700
692 void OnSnapshotDataReceived(int snapshot_id, 701 void OnSnapshotDataReceived(int snapshot_id,
693 const unsigned char* png, 702 const unsigned char* png,
694 size_t size); 703 size_t size);
695 704
696 void OnSnapshotDataReceivedAsync( 705 void OnSnapshotDataReceivedAsync(
697 int snapshot_id, 706 int snapshot_id,
698 scoped_refptr<base::RefCountedBytes> png_data); 707 scoped_refptr<base::RefCountedBytes> png_data);
699 708
709 void SendUpdateValueState(unsigned int target, const gpu::ValueState& state);
710
700 // Our delegate, which wants to know mainly about keyboard events. 711 // Our delegate, which wants to know mainly about keyboard events.
701 // It will remain non-NULL until DetachDelegate() is called. 712 // It will remain non-NULL until DetachDelegate() is called.
702 RenderWidgetHostDelegate* delegate_; 713 RenderWidgetHostDelegate* delegate_;
703 714
704 // Created during construction but initialized during Init*(). Therefore, it 715 // Created during construction but initialized during Init*(). Therefore, it
705 // is guaranteed never to be NULL, but its channel may be NULL if the 716 // is guaranteed never to be NULL, but its channel may be NULL if the
706 // renderer crashed, so you must always check that. 717 // renderer crashed, so you must always check that.
707 RenderProcessHost* process_; 718 RenderProcessHost* process_;
708 719
709 // The ID of the corresponding object in the Renderer Instance. 720 // The ID of the corresponding object in the Renderer Instance.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 853
843 int64 last_input_number_; 854 int64 last_input_number_;
844 855
845 bool subscribe_uniform_enabled_; 856 bool subscribe_uniform_enabled_;
846 857
847 int next_browser_snapshot_id_; 858 int next_browser_snapshot_id_;
848 typedef std::map<int, 859 typedef std::map<int,
849 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; 860 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap;
850 PendingSnapshotMap pending_browser_snapshots_; 861 PendingSnapshotMap pending_browser_snapshots_;
851 862
863 // This is a set of all subscription targets valuebuffers in the GPU process
864 // are currently subscribed too. Used to prevent sending unnecessary
865 // ValueState updates.
866 typedef base::hash_set<unsigned int> SubscriptionSet;
867 SubscriptionSet subscription_set_;
868
869 // Maintains ValueStates which are not currently subscribed too so we can
870 // pass them to the GpuService if a Valuebuffer ever subscribes to the
871 // respective subscription target
872 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_;
873
852 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 874 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
853 875
854 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 876 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
855 }; 877 };
856 878
857 } // namespace content 879 } // namespace content
858 880
859 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 881 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698