diff options
author | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-27 03:53:13 +0000 |
---|---|---|
committer | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-27 03:53:13 +0000 |
commit | 13fc6ba7dfd1852384b147a4f41bfadc15c30571 (patch) | |
tree | 871605b91df3d4c84506818d68af66e9e2d7691e /content/browser/gpu/gpu_surface_tracker.cc | |
parent | 43e584510e010afb9804d295c756a394552757b7 (diff) | |
download | chromium_src-13fc6ba7dfd1852384b147a4f41bfadc15c30571.zip chromium_src-13fc6ba7dfd1852384b147a4f41bfadc15c30571.tar.gz chromium_src-13fc6ba7dfd1852384b147a4f41bfadc15c30571.tar.bz2 |
Add GL surface creation for Android.
This creates either a texture transport surface (for compositor use) or a native window surface.
Also add a way to look up a surface handle that cannot be serialized over IPC. We simply get it from the tracker as we are running the GPU thread in the browser process.
BUG=136923
Review URL: https://chromiumcodereview.appspot.com/10795058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/gpu/gpu_surface_tracker.cc')
-rw-r--r-- | content/browser/gpu/gpu_surface_tracker.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/browser/gpu/gpu_surface_tracker.cc b/content/browser/gpu/gpu_surface_tracker.cc index 4b828f8..66bce81 100644 --- a/content/browser/gpu/gpu_surface_tracker.cc +++ b/content/browser/gpu/gpu_surface_tracker.cc @@ -8,9 +8,11 @@ GpuSurfaceTracker::GpuSurfaceTracker() : next_surface_id_(1) { + GpuSurfaceLookup::InitInstance(this); } GpuSurfaceTracker::~GpuSurfaceTracker() { + GpuSurfaceLookup::InitInstance(NULL); } GpuSurfaceTracker* GpuSurfaceTracker::GetInstance() { @@ -94,3 +96,11 @@ gfx::PluginWindowHandle GpuSurfaceTracker::GetSurfaceWindowHandle( return gfx::kNullPluginWindow; return it->second.handle.handle; } + +gfx::AcceleratedWidget GpuSurfaceTracker::GetNativeWidget(int surface_id) { + base::AutoLock lock(lock_); + SurfaceMap::iterator it = surface_map_.find(surface_id); + if (it == surface_map_.end()) + return gfx::kNullAcceleratedWidget; + return it->second.native_widget; +} |