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"
16 class FakeSoftwareOutputDevice
: public SoftwareOutputDevice
{
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
;
27 skia::RefPtr
<SkDevice
> device_
;
28 WebKit::WebImage image_
;
33 #endif // CC_TEST_FAKE_SOFTWARE_OUTPUT_DEVICE_H_