diff options
Diffstat (limited to 'chromium/ui/ozone/platform/dri/test/mock_surface_generator.cc')
-rw-r--r-- | chromium/ui/ozone/platform/dri/test/mock_surface_generator.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/chromium/ui/ozone/platform/dri/test/mock_surface_generator.cc b/chromium/ui/ozone/platform/dri/test/mock_surface_generator.cc new file mode 100644 index 00000000000..97df5bdbd2c --- /dev/null +++ b/chromium/ui/ozone/platform/dri/test/mock_surface_generator.cc @@ -0,0 +1,18 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/ozone/platform/dri/test/mock_surface_generator.h" + +namespace ui { + +MockSurfaceGenerator::MockSurfaceGenerator(DriWrapper* dri) : dri_(dri) {} + +MockSurfaceGenerator::~MockSurfaceGenerator() {} + +ScanoutSurface* MockSurfaceGenerator::Create(const gfx::Size& size) { + surfaces_.push_back(new MockDriSurface(dri_, size)); + return surfaces_.back(); +} + +} // namespace ui |