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

Unified Diff: ui/ozone/platform/test/test_window_manager.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: just add thread check 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/test/test_window_manager.cc
diff --git a/ui/ozone/platform/test/test_window_manager.cc b/ui/ozone/platform/test/test_window_manager.cc
index 3ff3a471dde45693f2cb7da0fdadec7928f1bccc..cd48bf33eefdacdd347c4280c64bf5e31fc14aa3 100644
--- a/ui/ozone/platform/test/test_window_manager.cc
+++ b/ui/ozone/platform/test/test_window_manager.cc
@@ -69,6 +69,7 @@ TestWindowManager::TestWindowManager(const base::FilePath& dump_location)
}
TestWindowManager::~TestWindowManager() {
+ DCHECK(thread_checker_.CalledOnValidThread());
}
void TestWindowManager::Initialize() {
@@ -96,6 +97,7 @@ base::FilePath TestWindowManager::base_path() const {
scoped_ptr<SurfaceOzoneCanvas> TestWindowManager::CreateCanvasForWidget(
gfx::AcceleratedWidget widget) {
+ DCHECK(thread_checker_.CalledOnValidThread());
TestWindow* window = windows_.Lookup(widget);
DCHECK(window);
return make_scoped_ptr<SurfaceOzoneCanvas>(new FileSurface(window->path()));
@@ -104,6 +106,7 @@ scoped_ptr<SurfaceOzoneCanvas> TestWindowManager::CreateCanvasForWidget(
bool TestWindowManager::LoadEGLGLES2Bindings(
AddGLLibraryCallback add_gl_library,
SetGLGetProcAddressProcCallback set_gl_get_proc_address) {
+ DCHECK(thread_checker_.CalledOnValidThread());
return false;
}

Powered by Google App Engine
This is Rietveld 408576698