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

Unified Diff: ui/ozone/public/surface_factory_ozone.cc

Issue 1050923003: zero-copy: Clarify to allocate/destroy GpuMemoryBuffer on any thread and use it on the main thread o (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: ui/ozone/public/surface_factory_ozone.cc
diff --git a/ui/ozone/public/surface_factory_ozone.cc b/ui/ozone/public/surface_factory_ozone.cc
index 1c57038d32452d9eecc4bea34178b9b65e8265af..836386878ef8a7b23cc0c5889f88bdcd3197f930 100644
--- a/ui/ozone/public/surface_factory_ozone.cc
+++ b/ui/ozone/public/surface_factory_ozone.cc
@@ -22,12 +22,14 @@ SurfaceFactoryOzone::SurfaceFactoryOzone() {
}
SurfaceFactoryOzone::~SurfaceFactoryOzone() {
+ DCHECK(thread_checker_.CalledOnValidThread());
DCHECK_EQ(impl_, this);
- impl_ = NULL;
+ impl_ = nullptr;
}
SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
DCHECK(impl_) << "No SurfaceFactoryOzone implementation set.";
+ DCHECK(impl_->thread_checker_.CalledOnValidThread());
return impl_;
}
« ui/ozone/public/surface_factory_ozone.h ('K') | « ui/ozone/public/surface_factory_ozone.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698