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

Side by Side Diff: cc/layers/render_surface.cc

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « cc/layers/render_surface.h ('k') | cc/layers/render_surface_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 2010 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/layers/render_surface.h"
6
7 #include "cc/base/math_util.h"
8 #include "cc/layers/layer.h"
9 #include "ui/gfx/transform.h"
10
11 namespace cc {
12
13 RenderSurface::RenderSurface(Layer* owning_layer)
14 : owning_layer_(owning_layer),
15 draw_opacity_(1),
16 draw_opacity_is_animating_(false),
17 target_surface_transforms_are_animating_(false),
18 screen_space_transforms_are_animating_(false),
19 is_clipped_(false),
20 contributes_to_drawn_surface_(false),
21 nearest_occlusion_immune_ancestor_(nullptr) {
22 }
23
24 RenderSurface::~RenderSurface() {
25 for (size_t i = 0; i < layer_list_.size(); ++i) {
26 DCHECK(!layer_list_.at(i)->render_surface()) <<
27 "RenderSurfaces should be cleared from the contributing layers " <<
28 "before destroying this surface to avoid leaking a circular " <<
29 "reference on the contributing layer. Probably the " <<
30 "RenderSurfaceLayerList should just be destroyed before destroying " <<
31 "any RenderSurfaces on layers.";
32 }
33 }
34
35 gfx::RectF RenderSurface::DrawableContentRect() const {
36 gfx::RectF drawable_content_rect =
37 MathUtil::MapClippedRect(draw_transform_, content_rect_);
38 if (owning_layer_->has_replica())
39 drawable_content_rect.Union(
40 MathUtil::MapClippedRect(replica_draw_transform_, content_rect_));
41 return drawable_content_rect;
42 }
43
44 void RenderSurface::ClearLayerLists() {
45 layer_list_.clear();
46 }
47
48 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface.h ('k') | cc/layers/render_surface_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698