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

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

Issue 11348371: cc: Move WebCompositorOutputSurface and related classes into cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forlanding6 Created 8 years 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
« no previous file with comments | « cc/test/fake_software_output_device.h ('k') | cc/test/fake_web_compositor_output_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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') | cc/test/fake_web_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698