| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/ozone/platform/test/test_window_manager.h" | 5 #include "ui/ozone/platform/test/test_window_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 bitmap.setInfo(surface_->getCanvas()->imageInfo()); | 47 bitmap.setInfo(surface_->getCanvas()->imageInfo()); |
| 48 | 48 |
| 49 // TODO(dnicoara) Use SkImage instead to potentially avoid a copy. | 49 // TODO(dnicoara) Use SkImage instead to potentially avoid a copy. |
| 50 // See crbug.com/361605 for details. | 50 // See crbug.com/361605 for details. |
| 51 if (surface_->getCanvas()->readPixels(&bitmap, 0, 0)) { | 51 if (surface_->getCanvas()->readPixels(&bitmap, 0, 0)) { |
| 52 base::WorkerPool::PostTask( | 52 base::WorkerPool::PostTask( |
| 53 FROM_HERE, base::Bind(&WriteDataToFile, location_, bitmap), true); | 53 FROM_HERE, base::Bind(&WriteDataToFile, location_, bitmap), true); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override { | 56 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override { |
| 57 return scoped_ptr<gfx::VSyncProvider>(); | 57 return nullptr; |
| 58 } | 58 } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 base::FilePath location_; | 61 base::FilePath location_; |
| 62 skia::RefPtr<SkSurface> surface_; | 62 skia::RefPtr<SkSurface> surface_; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace | 65 } // namespace |
| 66 | 66 |
| 67 TestWindowManager::TestWindowManager(const base::FilePath& dump_location) | 67 TestWindowManager::TestWindowManager(const base::FilePath& dump_location) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 return make_scoped_ptr<SurfaceOzoneCanvas>(new FileSurface(window->path())); | 101 return make_scoped_ptr<SurfaceOzoneCanvas>(new FileSurface(window->path())); |
| 102 } | 102 } |
| 103 | 103 |
| 104 bool TestWindowManager::LoadEGLGLES2Bindings( | 104 bool TestWindowManager::LoadEGLGLES2Bindings( |
| 105 AddGLLibraryCallback add_gl_library, | 105 AddGLLibraryCallback add_gl_library, |
| 106 SetGLGetProcAddressProcCallback set_gl_get_proc_address) { | 106 SetGLGetProcAddressProcCallback set_gl_get_proc_address) { |
| 107 return false; | 107 return false; |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // namespace ui | 110 } // namespace ui |
| OLD | NEW |