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

Side by Side Diff: cc/io_surface_layer.cc

Issue 12603013: Part 10 of cc/ directory shuffles: layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « cc/io_surface_layer.h ('k') | cc/io_surface_layer_impl.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/io_surface_layer.h"
6
7 #include "cc/io_surface_layer_impl.h"
8
9 namespace cc {
10
11 scoped_refptr<IOSurfaceLayer> IOSurfaceLayer::Create() {
12 return make_scoped_refptr(new IOSurfaceLayer());
13 }
14
15 IOSurfaceLayer::IOSurfaceLayer() : Layer(), io_surface_id_(0) {}
16
17 IOSurfaceLayer::~IOSurfaceLayer() {}
18
19 void IOSurfaceLayer::SetIOSurfaceProperties(uint32_t io_surface_id,
20 gfx::Size size) {
21 io_surface_id_ = io_surface_id;
22 io_surface_size_ = size;
23 SetNeedsCommit();
24 }
25
26 scoped_ptr<LayerImpl> IOSurfaceLayer::CreateLayerImpl(
27 LayerTreeImpl* tree_impl) {
28 return IOSurfaceLayerImpl::Create(tree_impl, layer_id_).PassAs<LayerImpl>();
29 }
30
31 bool IOSurfaceLayer::DrawsContent() const {
32 return io_surface_id_ && Layer::DrawsContent();
33 }
34
35 void IOSurfaceLayer::PushPropertiesTo(LayerImpl* layer) {
36 Layer::PushPropertiesTo(layer);
37
38 IOSurfaceLayerImpl* io_surface_layer =
39 static_cast<IOSurfaceLayerImpl*>(layer);
40 io_surface_layer->SetIOSurfaceProperties(io_surface_id_, io_surface_size_);
41 }
42
43 } // namespace cc
OLDNEW
« no previous file with comments | « cc/io_surface_layer.h ('k') | cc/io_surface_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698