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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc

Issue 1134993003: ozone: Implement zero/one-copy texture for Ozone GBM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/ozone/common/stub_client_native_pixmap_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc
index e7ebdcff57c14d1fabe62f9c697b0c52cecb499c..afeeb2ca4747066483effec62b104d74c99a8868 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc
@@ -29,19 +29,21 @@ GpuMemoryBufferImplOzoneNativePixmap::CreateFromHandle(
const DestructionCallback& callback) {
scoped_ptr<ui::ClientNativePixmap> native_pixmap =
ui::ClientNativePixmapFactory::GetInstance()->ImportFromHandle(
- handle.native_pixmap_handle, size, format, usage);
+ handle.native_pixmap_handle, size, usage);
DCHECK(native_pixmap);
- return make_scoped_ptr(
- new GpuMemoryBufferImplOzoneNativePixmap(handle.id, size, format,
- callback, native_pixmap.Pass()));
+ return make_scoped_ptr(new GpuMemoryBufferImplOzoneNativePixmap(
+ handle.id, size, format, callback, native_pixmap.Pass()));
}
bool GpuMemoryBufferImplOzoneNativePixmap::Map(void** data) {
- return pixmap_->Map(data);
+ *data = pixmap_->Map();
+ mapped_ = true;
+ return mapped_;
}
void GpuMemoryBufferImplOzoneNativePixmap::Unmap() {
pixmap_->Unmap();
+ mapped_ = false;
}
void GpuMemoryBufferImplOzoneNativePixmap::GetStride(int* stride) const {
« no previous file with comments | « no previous file | ui/ozone/common/stub_client_native_pixmap_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698