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 #include "cc/test/fake_software_output_device.h"
9 FakeSoftwareOutputDevice::FakeSoftwareOutputDevice() {}
11 FakeSoftwareOutputDevice::~FakeSoftwareOutputDevice() {}
13 WebKit::WebImage
* FakeSoftwareOutputDevice::Lock(bool forWrite
) {
15 image_
= device_
->accessBitmap(forWrite
);
19 void FakeSoftwareOutputDevice::Unlock() {
23 void FakeSoftwareOutputDevice::DidChangeViewportSize(gfx::Size size
) {
25 size
.width() == device_
->width() &&
26 size
.height() == device_
->height())
29 device_
= skia::AdoptRef(new SkDevice(
30 SkBitmap::kARGB_8888_Config
, size
.width(), size
.height(), true));