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

Side by Side Diff: gpu/ipc/service/pass_through_image_transport_surface.h

Issue 2771053003: WIP: Plumbing input event latency reporting through Mus GPU.
Patch Set: NON_EXPORTED_BASE Created 3 years, 8 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 GPU_IPC_SERVICE_PASS_THROUGH_IMAGE_TRANSPORT_SURFACE_H_ 5 #ifndef GPU_IPC_SERVICE_PASS_THROUGH_IMAGE_TRANSPORT_SURFACE_H_
6 #define GPU_IPC_SERVICE_PASS_THROUGH_IMAGE_TRANSPORT_SURFACE_H_ 6 #define GPU_IPC_SERVICE_PASS_THROUGH_IMAGE_TRANSPORT_SURFACE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const SwapCompletionCallback& callback) override; 45 const SwapCompletionCallback& callback) override;
46 bool OnMakeCurrent(gl::GLContext* context) override; 46 bool OnMakeCurrent(gl::GLContext* context) override;
47 47
48 private: 48 private:
49 ~PassThroughImageTransportSurface() override; 49 ~PassThroughImageTransportSurface() override;
50 50
51 // If updated vsync parameters can be determined, send this information to 51 // If updated vsync parameters can be determined, send this information to
52 // the browser. 52 // the browser.
53 void SendVSyncUpdateIfAvailable(); 53 void SendVSyncUpdateIfAvailable();
54 54
55 void SetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); 55 // Add |latency_info| to be reported and augumented with GPU latency
56 // components next time there is a GPU buffer swap.
57 void AddLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info);
56 std::unique_ptr<std::vector<ui::LatencyInfo>> StartSwapBuffers(); 58 std::unique_ptr<std::vector<ui::LatencyInfo>> StartSwapBuffers();
57 void FinishSwapBuffers( 59 void FinishSwapBuffers(
58 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info, 60 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info,
59 gfx::SwapResult result); 61 gfx::SwapResult result);
60 void FinishSwapBuffersAsync( 62 void FinishSwapBuffersAsync(
61 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info, 63 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info,
62 GLSurface::SwapCompletionCallback callback, 64 GLSurface::SwapCompletionCallback callback,
63 gfx::SwapResult result); 65 gfx::SwapResult result);
64 66
65 base::WeakPtr<ImageTransportSurfaceDelegate> delegate_; 67 base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;
66 bool did_set_swap_interval_; 68 bool did_set_swap_interval_;
67 std::vector<ui::LatencyInfo> latency_info_; 69 std::vector<ui::LatencyInfo> latency_info_;
68 base::WeakPtrFactory<PassThroughImageTransportSurface> weak_ptr_factory_; 70 base::WeakPtrFactory<PassThroughImageTransportSurface> weak_ptr_factory_;
69 71
70 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); 72 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface);
71 }; 73 };
72 74
73 } // namespace gpu 75 } // namespace gpu
74 76
75 #endif // GPU_IPC_SERVICE_PASS_THROUGH_IMAGE_TRANSPORT_SURFACE_H_ 77 #endif // GPU_IPC_SERVICE_PASS_THROUGH_IMAGE_TRANSPORT_SURFACE_H_
OLDNEW
« no previous file with comments | « gpu/ipc/in_process_command_buffer.cc ('k') | gpu/ipc/service/pass_through_image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698