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

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

Issue 2738613006: Remove non-leaky LazyInstances in cc. (Closed)
Patch Set: cc-remove-non-leaky-singletons: globals Created 3 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
« no previous file with comments | « cc/layers/empty_content_layer_client.h ('k') | cc/layers/picture_layer_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
(Empty)
1 // Copyright 2015 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/empty_content_layer_client.h"
6
7 #include "cc/playback/display_item_list.h"
8 #include "ui/gfx/geometry/rect.h"
9
10 namespace cc {
11
12 namespace {
13 base::LazyInstance<EmptyContentLayerClient>::DestructorAtExit
14 g_empty_content_layer_client = LAZY_INSTANCE_INITIALIZER;
15 }
16
17 // static
18 ContentLayerClient* EmptyContentLayerClient::GetInstance() {
19 return g_empty_content_layer_client.Pointer();
20 }
21
22 EmptyContentLayerClient::EmptyContentLayerClient() {}
23
24 EmptyContentLayerClient::~EmptyContentLayerClient() {}
25
26 gfx::Rect EmptyContentLayerClient::PaintableRegion() {
27 return gfx::Rect();
28 }
29
30 scoped_refptr<DisplayItemList>
31 EmptyContentLayerClient::PaintContentsToDisplayList(
32 PaintingControlSetting painting_status) {
33 return make_scoped_refptr(new DisplayItemList);
34 }
35
36 bool EmptyContentLayerClient::FillsBoundsCompletely() const {
37 return false;
38 }
39
40 size_t EmptyContentLayerClient::GetApproximateUnsharedMemoryUsage() const {
41 return 0u;
42 }
43
44 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/empty_content_layer_client.h ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698