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

Side by Side Diff: content/common/gpu/image_transport_surface.h

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 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 (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_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "ipc/ipc_listener.h" 16 #include "ipc/ipc_listener.h"
17 #include "ipc/ipc_message.h" 17 #include "ipc/ipc_message.h"
18 #include "ui/events/latency_info.h" 18 #include "ui/events/latency_info.h"
19 #include "ui/gfx/geometry/rect.h" 19 #include "ui/gfx/geometry/rect.h"
20 #include "ui/gfx/geometry/size.h" 20 #include "ui/gfx/geometry/size.h"
21 #include "ui/gfx/native_widget_types.h" 21 #include "ui/gfx/native_widget_types.h"
22 #include "ui/gfx/swap_result.h"
22 #include "ui/gl/gl_surface.h" 23 #include "ui/gl/gl_surface.h"
23 24
24 struct AcceleratedSurfaceMsg_BufferPresented_Params; 25 struct AcceleratedSurfaceMsg_BufferPresented_Params;
25 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; 26 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
26 27
27 namespace gfx { 28 namespace gfx {
28 class GLSurface; 29 class GLSurface;
29 } 30 }
30 31
31 namespace gpu { 32 namespace gpu {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 void SetLatencyInfo( 190 void SetLatencyInfo(
190 const std::vector<ui::LatencyInfo>& latency_info) override; 191 const std::vector<ui::LatencyInfo>& latency_info) override;
191 void WakeUpGpu() override; 192 void WakeUpGpu() override;
192 193
193 protected: 194 protected:
194 ~PassThroughImageTransportSurface() override; 195 ~PassThroughImageTransportSurface() override;
195 196
196 // If updated vsync parameters can be determined, send this information to 197 // If updated vsync parameters can be determined, send this information to
197 // the browser. 198 // the browser.
198 virtual void SendVSyncUpdateIfAvailable(); 199 virtual void SendVSyncUpdateIfAvailable();
199 void SwapBuffersCallBack(); 200 void SwapBuffersCallBack(gfx::SwapResult result);
200 201
201 ImageTransportHelper* GetHelper() { return helper_.get(); } 202 ImageTransportHelper* GetHelper() { return helper_.get(); }
202 203
203 private: 204 private:
204 scoped_ptr<ImageTransportHelper> helper_; 205 scoped_ptr<ImageTransportHelper> helper_;
205 bool did_set_swap_interval_; 206 bool did_set_swap_interval_;
206 std::vector<ui::LatencyInfo> latency_info_; 207 std::vector<ui::LatencyInfo> latency_info_;
207 base::WeakPtrFactory<PassThroughImageTransportSurface> weak_ptr_factory_; 208 base::WeakPtrFactory<PassThroughImageTransportSurface> weak_ptr_factory_;
208 209
209 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); 210 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface);
210 }; 211 };
211 212
212 } // namespace content 213 } // namespace content
213 214
214 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 215 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698