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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl_ozone_gbm_intel.h

Issue 1071273002: NotForReview: Implement zero/one-copy texture for ozone freon using Intel DRM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_GBM_INTEL_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_GBM_INTEL_H_
7
8 extern "C" {
9 #include <libdrm/intel_bufmgr.h>
10 }
11
12 #include "content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h "
13
14 namespace content {
15
16 // Implementation of GPU memory buffer based on Ozone GBM libdrm_intel.so.
17 class GpuMemoryBufferImplOzoneGbmIntel
reveman 2015/04/13 00:46:13 It should either be implemented behind OzoneNative
dshwang 2015/04/14 13:15:55 behind OzoneNativeBuffer. It's ozone specific beca
18 : public GpuMemoryBufferImplOzoneNativeBuffer {
19 public:
20 static scoped_ptr<GpuMemoryBufferImpl> CreateFromHandle(
21 const gfx::GpuMemoryBufferHandle& handle,
22 const gfx::Size& size,
23 Format format,
24 const DestructionCallback& callback);
25 ~GpuMemoryBufferImplOzoneGbmIntel() override;
26
27 // Overridden from gfx::GpuMemoryBuffer:
28 bool Map(void** data) override;
29 void Unmap() override;
30 void GetStride(uint32* stride) const override;
31 gfx::GpuMemoryBufferHandle GetHandle() const override;
32
33 private:
34 GpuMemoryBufferImplOzoneGbmIntel(gfx::GpuMemoryBufferId id,
35 const gfx::Size& size,
36 Format format,
37 const DestructionCallback& callback);
38
39 bool Initialize(const gfx::GpuMemoryBufferHandle& handle);
40
41 drm_intel_bo* buffer_;
42 base::ScopedFD prime_fd_;
43 uint32 stride_;
44
45 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplOzoneGbmIntel);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_GBM_INTEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698