| 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 #include "content/browser/gpu/gpu_surface_tracker.h" | 5 #include "content/browser/gpu/gpu_surface_tracker.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 #if defined(OS_ANDROID) | 52 #if defined(OS_ANDROID) |
| 53 if (it->second != gfx::kNullAcceleratedWidget) | 53 if (it->second != gfx::kNullAcceleratedWidget) |
| 54 ANativeWindow_acquire(it->second); | 54 ANativeWindow_acquire(it->second); |
| 55 #endif // defined(OS_ANDROID) | 55 #endif // defined(OS_ANDROID) |
| 56 | 56 |
| 57 return it->second; | 57 return it->second; |
| 58 } | 58 } |
| 59 | 59 |
| 60 #if defined(OS_ANDROID) | 60 #if defined(OS_ANDROID) |
| 61 gfx::ScopedJavaSurface GpuSurfaceTracker::AcquireJavaSurface(int surface_id) { | 61 gl::ScopedJavaSurface GpuSurfaceTracker::AcquireJavaSurface(int surface_id) { |
| 62 return GetViewSurface(surface_id); | 62 return GetViewSurface(surface_id); |
| 63 } | 63 } |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 std::size_t GpuSurfaceTracker::GetSurfaceCount() { | 66 std::size_t GpuSurfaceTracker::GetSurfaceCount() { |
| 67 base::AutoLock lock(lock_); | 67 base::AutoLock lock(lock_); |
| 68 return surface_map_.size(); | 68 return surface_map_.size(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace content | 71 } // namespace content |
| OLD | NEW |