| OLD | NEW |
| 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_GPU_GPU_SURFACE_TRACKER_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_SURFACE_TRACKER_H_ |
| 6 #define CONTENT_BROWSER_GPU_GPU_SURFACE_TRACKER_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_SURFACE_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
| 13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
| 14 #include "content/common/gpu/gpu_surface_lookup.h" | 14 #include "content/common/gpu/gpu_surface_lookup.h" |
| 15 #include "ui/gfx/geometry/size.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 16 #include "ui/gfx/size.h" | |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 // This class is responsible for managing rendering surfaces exposed to the | 20 // This class is responsible for managing rendering surfaces exposed to the |
| 21 // GPU process. Every surface gets registered to this class, and gets an ID. | 21 // GPU process. Every surface gets registered to this class, and gets an ID. |
| 22 // All calls to and from the GPU process, with the exception of | 22 // All calls to and from the GPU process, with the exception of |
| 23 // CreateViewCommandBuffer, refer to the rendering surface by its ID. | 23 // CreateViewCommandBuffer, refer to the rendering surface by its ID. |
| 24 // This class is thread safe. | 24 // This class is thread safe. |
| 25 // | 25 // |
| 26 // Note: The ID can exist before the actual native handle for the surface is | 26 // Note: The ID can exist before the actual native handle for the surface is |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 base::Lock lock_; | 129 base::Lock lock_; |
| 130 SurfaceMap surface_map_; | 130 SurfaceMap surface_map_; |
| 131 int next_surface_id_; | 131 int next_surface_id_; |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(GpuSurfaceTracker); | 133 DISALLOW_COPY_AND_ASSIGN(GpuSurfaceTracker); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace content | 136 } // namespace content |
| 137 | 137 |
| 138 #endif // CONTENT_BROWSER_GPU_GPU_SURFACE_TRACKER_H_ | 138 #endif // CONTENT_BROWSER_GPU_GPU_SURFACE_TRACKER_H_ |
| OLD | NEW |