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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.h

Issue 1137823002: Pass collected frame timing events to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed implementing virtual function on Android html_viewer. Created 5 years, 6 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 5 #ifndef CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 float top_controls_delta) override; 147 float top_controls_delta) override;
148 void RequestNewOutputSurface() override; 148 void RequestNewOutputSurface() override;
149 void DidInitializeOutputSurface() override; 149 void DidInitializeOutputSurface() override;
150 void DidFailToInitializeOutputSurface() override; 150 void DidFailToInitializeOutputSurface() override;
151 void WillCommit() override; 151 void WillCommit() override;
152 void DidCommit() override; 152 void DidCommit() override;
153 void DidCommitAndDrawFrame() override; 153 void DidCommitAndDrawFrame() override;
154 void DidCompleteSwapBuffers() override; 154 void DidCompleteSwapBuffers() override;
155 void DidCompletePageScaleAnimation() override; 155 void DidCompletePageScaleAnimation() override;
156 void RateLimitSharedMainThreadContext() override; 156 void RateLimitSharedMainThreadContext() override;
157 void RecordFrameTimingEvents(
158 scoped_ptr<cc::FrameTimingTracker::CompositeTimingSet> composite_events,
159 scoped_ptr<cc::FrameTimingTracker::MainFrameTimingSet> main_frame_events)
160 override;
157 161
158 // cc::LayerTreeHostSingleThreadClient implementation. 162 // cc::LayerTreeHostSingleThreadClient implementation.
159 void ScheduleAnimation() override; 163 void ScheduleAnimation() override;
160 void DidPostSwapBuffers() override; 164 void DidPostSwapBuffers() override;
161 void DidAbortSwapBuffers() override; 165 void DidAbortSwapBuffers() override;
162 166
163 enum { 167 enum {
164 OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK = 4, 168 OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK = 4,
165 MAX_OUTPUT_SURFACE_RETRIES = 5, 169 MAX_OUTPUT_SURFACE_RETRIES = 5,
166 }; 170 };
167 171
168 protected: 172 protected:
169 RenderWidgetCompositor(RenderWidget* widget, 173 RenderWidgetCompositor(RenderWidget* widget,
170 CompositorDependencies* compositor_deps); 174 CompositorDependencies* compositor_deps);
171 175
172 void Initialize(); 176 void Initialize();
173 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } 177 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); }
174 178
175 private: 179 private:
176 void ScheduleCommit(); 180 void ScheduleCommit();
177 bool CommitIsSynchronous() const; 181 bool CommitIsSynchronous() const;
178 void SynchronousCommit(); 182 void SynchronousCommit();
179 183
180 int num_failed_recreate_attempts_; 184 int num_failed_recreate_attempts_;
181 RenderWidget* widget_; 185 RenderWidget* widget_;
182 CompositorDependencies* compositor_deps_; 186 CompositorDependencies* compositor_deps_;
183 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 187 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
184 188
185 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; 189 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_;
186 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; 190 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_;
187 191
188 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; 192 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_;
189 }; 193 };
190 194
191 } // namespace content 195 } // namespace content
192 196
193 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 197 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.h ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698