add a use_alsa gyp setting
[chromium-blink-merge.git] / cc / test / fake_software_output_device.h
blob0ee28a3be891911c734198e3a94829a18fda3b56
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_TEST_FAKE_SOFTWARE_OUTPUT_DEVICE_H_
6 #define CC_TEST_FAKE_SOFTWARE_OUTPUT_DEVICE_H_
8 #include "base/logging.h"
9 #include "cc/software_output_device.h"
10 #include "skia/ext/refptr.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h"
12 #include "third_party/skia/include/core/SkDevice.h"
14 namespace cc {
16 class FakeSoftwareOutputDevice : public SoftwareOutputDevice {
17 public:
18 FakeSoftwareOutputDevice();
19 virtual ~FakeSoftwareOutputDevice();
21 virtual WebKit::WebImage* Lock(bool forWrite) OVERRIDE;
22 virtual void Unlock() OVERRIDE;
24 virtual void DidChangeViewportSize(gfx::Size size) OVERRIDE;
26 private:
27 skia::RefPtr<SkDevice> device_;
28 WebKit::WebImage image_;
31 } // namespace cc
33 #endif // CC_TEST_FAKE_SOFTWARE_OUTPUT_DEVICE_H_