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

Side by Side Diff: gpu/ipc/service/gpu_memory_buffer_factory_surface_texture.h

Issue 2061743004: Implement native GMB backbuffers in the GLES2 Command Decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile error on Windows. Created 4 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_
6 #define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ 6 #define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 int client_id) override; 42 int client_id) override;
43 ImageFactory* AsImageFactory() override; 43 ImageFactory* AsImageFactory() override;
44 44
45 // Overridden from ImageFactory: 45 // Overridden from ImageFactory:
46 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( 46 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
47 const gfx::GpuMemoryBufferHandle& handle, 47 const gfx::GpuMemoryBufferHandle& handle,
48 const gfx::Size& size, 48 const gfx::Size& size,
49 gfx::BufferFormat format, 49 gfx::BufferFormat format,
50 unsigned internalformat, 50 unsigned internalformat,
51 int client_id) override; 51 int client_id) override;
52 scoped_refptr<gl::GLImage> CreateAnonymousImage(
53 const gfx::Size& size,
54 gfx::BufferFormat format,
55 unsigned internalformat) override;
52 56
53 private: 57 private:
54 typedef std::pair<int, int> SurfaceTextureMapKey; 58 typedef std::pair<int, int> SurfaceTextureMapKey;
55 typedef base::hash_map<SurfaceTextureMapKey, 59 typedef base::hash_map<SurfaceTextureMapKey,
56 scoped_refptr<gl::SurfaceTexture>> 60 scoped_refptr<gl::SurfaceTexture>>
57 SurfaceTextureMap; 61 SurfaceTextureMap;
58 SurfaceTextureMap surface_textures_; 62 SurfaceTextureMap surface_textures_;
59 base::Lock surface_textures_lock_; 63 base::Lock surface_textures_lock_;
60 }; 64 };
61 65
62 } // namespace gpu 66 } // namespace gpu
63 67
64 #endif // GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ 68 #endif // GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698