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

Side by Side Diff: webkit/compositor_bindings/web_compositor_support_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
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 "webkit/compositor_bindings/web_compositor_support_software_output_devi ce.h"
6
7 namespace webkit {
8
9 WebCompositorSupportSoftwareOutputDevice::
10 WebCompositorSupportSoftwareOutputDevice() {}
11
12 WebCompositorSupportSoftwareOutputDevice::
13 ~WebCompositorSupportSoftwareOutputDevice() {}
14
15 WebKit::WebImage* WebCompositorSupportSoftwareOutputDevice::Lock(
16 bool forWrite) {
17 DCHECK(device_);
18 image_ = device_->accessBitmap(forWrite);
19 return &image_;
20 }
21
22 void WebCompositorSupportSoftwareOutputDevice::Unlock() {
23 image_.reset();
24 }
25
26 void WebCompositorSupportSoftwareOutputDevice::DidChangeViewportSize(
27 gfx::Size size) {
28 if (device_.get() &&
29 size.width() == device_->width() &&
30 size.height() == device_->height())
31 return;
32
33 device_ = skia::AdoptRef(new SkDevice(
34 SkBitmap::kARGB_8888_Config, size.width(), size.height(), true));
35 }
36
37 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698