Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: cc/test/fake_software_output_device.cc

Issue 12379055: Changed SoftwareOutputDevice interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed cc.gyp deps Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 #include "cc/test/fake_software_output_device.h"
6
7 namespace cc {
8
9 FakeSoftwareOutputDevice::FakeSoftwareOutputDevice() {}
10
11 FakeSoftwareOutputDevice::~FakeSoftwareOutputDevice() {}
12
13 WebKit::WebImage* FakeSoftwareOutputDevice::Lock(bool forWrite) {
14 DCHECK(device_);
15 image_ = device_->accessBitmap(forWrite);
16 return &image_;
17 }
18
19 void FakeSoftwareOutputDevice::Unlock() {
20 image_.reset();
21 }
22
23 void FakeSoftwareOutputDevice::DidChangeViewportSize(gfx::Size size) {
24 if (device_.get() &&
25 size.width() == device_->width() &&
26 size.height() == device_->height())
27 return;
28
29 device_ = skia::AdoptRef(new SkDevice(
30 SkBitmap::kARGB_8888_Config, size.width(), size.height(), true));
31 }
32
33 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_software_output_device.h ('k') | content/renderer/gpu/compositor_software_output_device_gl_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698