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

Side by Side Diff: gpu/ipc/common/gpu_surface_tracker.h

Issue 2431753002: Mus experiment in content shell on Android.
Patch Set: Addressed comments, fixed browser tests and deps. Created 4 years, 2 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 GPU_IPC_COMMON_GPU_SURFACE_TRACKER_H_ 5 #ifndef GPU_IPC_COMMON_GPU_SURFACE_TRACKER_H_
6 #define GPU_IPC_COMMON_GPU_SURFACE_TRACKER_H_ 6 #define GPU_IPC_COMMON_GPU_SURFACE_TRACKER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 28 matching lines...) Expand all
39 gpu::SurfaceHandle surface_handle) override; 39 gpu::SurfaceHandle surface_handle) override;
40 40
41 #if defined(OS_ANDROID) 41 #if defined(OS_ANDROID)
42 void RegisterViewSurface(int surface_id, 42 void RegisterViewSurface(int surface_id,
43 const base::android::JavaRef<jobject>& j_surface); 43 const base::android::JavaRef<jobject>& j_surface);
44 void UnregisterViewSurface(int surface_id); 44 void UnregisterViewSurface(int surface_id);
45 gl::ScopedJavaSurface AcquireJavaSurface(int surface_id) override; 45 gl::ScopedJavaSurface AcquireJavaSurface(int surface_id) override;
46 #endif 46 #endif
47 47
48 // Gets the global instance of the surface tracker. 48 // Gets the global instance of the surface tracker.
49 static GpuSurfaceTracker* Get() { return GetInstance(); } 49 static GPU_EXPORT GpuSurfaceTracker* Get() { return GetInstance(); }
50 50
51 // Adds a surface for a native widget. Returns the surface ID. 51 // Adds a surface for a native widget. Returns the surface ID.
52 int AddSurfaceForNativeWidget(gfx::AcceleratedWidget widget); 52 int AddSurfaceForNativeWidget(gfx::AcceleratedWidget widget);
53 53
54 // Return true if the surface handle is registered with the tracker. 54 // Return true if the surface handle is registered with the tracker.
55 bool IsValidSurfaceHandle(gpu::SurfaceHandle surface_handle) const; 55 bool IsValidSurfaceHandle(gpu::SurfaceHandle surface_handle) const;
56 56
57 // Removes a given existing surface. 57 // Removes a given existing surface.
58 void RemoveSurface(gpu::SurfaceHandle surface_handle); 58 void RemoveSurface(gpu::SurfaceHandle surface_handle);
59 59
(...skipping 22 matching lines...) Expand all
82 SurfaceViewMap surface_view_map_; 82 SurfaceViewMap surface_view_map_;
83 #endif 83 #endif
84 84
85 DISALLOW_COPY_AND_ASSIGN(GpuSurfaceTracker); 85 DISALLOW_COPY_AND_ASSIGN(GpuSurfaceTracker);
86 }; 86 };
87 87
88 } // namespace ui 88 } // namespace ui
89 89
90 #endif // GPU_IPC_COMMON_GPU_SURFACE_TRACKER_H_ 90 #endif // GPU_IPC_COMMON_GPU_SURFACE_TRACKER_H_
91 91
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698