OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef CC_TEST_FAKE_SOFTWARE_OUTPUT_DEVICE_H_ | |
6 #define CC_TEST_FAKE_SOFTWARE_OUTPUT_DEVICE_H_ | |
7 | |
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" | |
13 | |
14 namespace cc { | |
15 | |
16 class FakeSoftwareOutputDevice : public SoftwareOutputDevice { | |
17 public: | |
18 FakeSoftwareOutputDevice(); | |
19 virtual ~FakeSoftwareOutputDevice(); | |
20 | |
21 virtual WebKit::WebImage* Lock(bool forWrite) OVERRIDE; | |
22 virtual void Unlock() OVERRIDE; | |
23 | |
24 virtual void DidChangeViewportSize(gfx::Size size) OVERRIDE; | |
25 | |
26 private: | |
27 skia::RefPtr<SkDevice> device_; | |
28 WebKit::WebImage image_; | |
29 }; | |
30 | |
31 } // namespace cc | |
32 | |
33 #endif // CC_TEST_FAKE_SOFTWARE_OUTPUT_DEVICE_H_ | |
OLD | NEW |