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

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

Issue 11474050: cc: Unify namespaces for all test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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_web_compositor_output_surface.cc ('k') | cc/test/fake_web_graphics_context_3d.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_web_compositor_software_output_device.h"
6
7 namespace cc {
8
9 FakeWebCompositorSoftwareOutputDevice::FakeWebCompositorSoftwareOutputDevice() {
10 }
11
12 FakeWebCompositorSoftwareOutputDevice::
13 ~FakeWebCompositorSoftwareOutputDevice() {
14 }
15
16 WebKit::WebImage* FakeWebCompositorSoftwareOutputDevice::lock(bool forWrite) {
17 DCHECK(m_device.get());
18 m_image = m_device->accessBitmap(forWrite);
19 return &m_image;
20 }
21
22 void FakeWebCompositorSoftwareOutputDevice::unlock() {
23 m_image.reset();
24 }
25
26 void FakeWebCompositorSoftwareOutputDevice::didChangeViewportSize(
27 WebKit::WebSize size) {
28 if (m_device.get() && size.width == m_device->width() &&
29 size.height == m_device->height())
30 return;
31
32 m_device.reset(new SkDevice(
33 SkBitmap::kARGB_8888_Config,
34 size.width,
35 size.height,
36 true));
37 }
38
39 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_web_compositor_output_surface.cc ('k') | cc/test/fake_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698