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

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: make content_unittests (GpuMemoryBuffer*) pass 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/platform/drm/BUILD.gn » ('j') | ui/ozone/platform/drm/BUILD.gn » ('J')
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 40500a604f8a10ed40790cccb67a61348d455023..214cddd281f23f1c5ed760cdc3cfbbcd5196647e 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
@@ -36,11 +36,17 @@ GpuMemoryBufferImplOzoneNativePixmap::CreateFromHandle(
}
bool GpuMemoryBufferImplOzoneNativePixmap::Map(void** data) {
- return pixmap_->Map(data);
+ DCHECK(!mapped_);
reveman 2015/08/07 17:59:44 Looks like you already have this dcheck in the pix
dshwang 2015/08/11 17:44:56 All GpuMemoryBufferImplXXX::Map/Unmap has same dch
reveman 2015/08/11 18:53:52 Other implementations have DCHECKs as we're not in
dshwang 2015/08/11 19:36:06 Done. Thank you for patient explanation.
+ bool result = pixmap_->Map(data);
+ if (result)
+ mapped_ = true;
+ return result;
}
void GpuMemoryBufferImplOzoneNativePixmap::Unmap() {
+ DCHECK(mapped_);
pixmap_->Unmap();
+ mapped_ = false;
}
void GpuMemoryBufferImplOzoneNativePixmap::GetStride(int* stride) const {
« no previous file with comments | « no previous file | ui/ozone/platform/drm/BUILD.gn » ('j') | ui/ozone/platform/drm/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698