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

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

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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/layer.h ('k') | cc/layers/layer_iterator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 16 matching lines...) Expand all
27 #include "cc/trees/layer_tree_host.h" 27 #include "cc/trees/layer_tree_host.h"
28 #include "cc/trees/layer_tree_impl.h" 28 #include "cc/trees/layer_tree_impl.h"
29 #include "third_party/skia/include/core/SkImageFilter.h" 29 #include "third_party/skia/include/core/SkImageFilter.h"
30 #include "ui/gfx/geometry/rect_conversions.h" 30 #include "ui/gfx/geometry/rect_conversions.h"
31 #include "ui/gfx/geometry/vector2d_conversions.h" 31 #include "ui/gfx/geometry/vector2d_conversions.h"
32 32
33 namespace cc { 33 namespace cc {
34 34
35 base::StaticAtomicSequenceNumber g_next_layer_id; 35 base::StaticAtomicSequenceNumber g_next_layer_id;
36 36
37 scoped_refptr<Layer> Layer::Create() { 37 scoped_refptr<Layer> Layer::Create(const LayerSettings& settings) {
38 return make_scoped_refptr(new Layer()); 38 return make_scoped_refptr(new Layer(settings));
39 } 39 }
40 40
41 Layer::Layer() 41 Layer::Layer(const LayerSettings& settings)
42 : needs_push_properties_(false), 42 : needs_push_properties_(false),
43 num_dependents_need_push_properties_(false), 43 num_dependents_need_push_properties_(false),
44 stacking_order_changed_(false), 44 stacking_order_changed_(false),
45 // Layer IDs start from 1. 45 // Layer IDs start from 1.
46 layer_id_(g_next_layer_id.GetNext() + 1), 46 layer_id_(g_next_layer_id.GetNext() + 1),
47 ignore_set_needs_commit_(false), 47 ignore_set_needs_commit_(false),
48 sorting_context_id_(0), 48 sorting_context_id_(0),
49 parent_(nullptr), 49 parent_(nullptr),
50 layer_tree_host_(nullptr), 50 layer_tree_host_(nullptr),
51 scroll_clip_layer_id_(INVALID_ID), 51 scroll_clip_layer_id_(INVALID_ID),
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 1569
1570 void Layer::DidBeginTracing() { 1570 void Layer::DidBeginTracing() {
1571 // We'll be dumping layer trees as part of trace, so make sure 1571 // We'll be dumping layer trees as part of trace, so make sure
1572 // PushPropertiesTo() propagates layer debug info to the impl 1572 // PushPropertiesTo() propagates layer debug info to the impl
1573 // side -- otherwise this won't happen for the the layers that 1573 // side -- otherwise this won't happen for the the layers that
1574 // remain unchanged since tracing started. 1574 // remain unchanged since tracing started.
1575 SetNeedsPushProperties(); 1575 SetNeedsPushProperties();
1576 } 1576 }
1577 1577
1578 } // namespace cc 1578 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_iterator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698