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

Unified Diff: cc/layers/empty_content_layer_client.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/BUILD.gn ('k') | cc/layers/empty_content_layer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/empty_content_layer_client.h
diff --git a/cc/layers/empty_content_layer_client.h b/cc/layers/empty_content_layer_client.h
deleted file mode 100644
index 451b363a0d228a84178f4a85b98768ab9dc5a1da..0000000000000000000000000000000000000000
--- a/cc/layers/empty_content_layer_client.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CC_LAYERS_EMPTY_CONTENT_LAYER_CLIENT_H_
-#define CC_LAYERS_EMPTY_CONTENT_LAYER_CLIENT_H_
-
-#include <memory>
-
-#include "base/lazy_instance.h"
-#include "base/macros.h"
-#include "cc/base/cc_export.h"
-#include "cc/layers/content_layer_client.h"
-#include "ui/gfx/geometry/rect.h"
-
-namespace cc {
-
-class DisplayItemList;
-
-// This is used by deserialized PictureLayers which have no local
-// ContentLayerClient but still have valid content from the original serialized
-// PictureLayer. The PictureLayer class requires a valid ContentLayerClient to
-// determine if it can draw. This is a dummy client to keep the logic fairly
-// straightforward. This is also used by unit tests for creating dummy
-// PictureLayers.
-class CC_EXPORT EmptyContentLayerClient : public ContentLayerClient {
- public:
- static ContentLayerClient* GetInstance();
-
- // ContentLayerClient implementation.
- gfx::Rect PaintableRegion() override;
- scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
- PaintingControlSetting painting_status) override;
- bool FillsBoundsCompletely() const override;
- size_t GetApproximateUnsharedMemoryUsage() const override;
-
- private:
- friend struct base::LazyInstanceTraitsBase<EmptyContentLayerClient>;
-
- EmptyContentLayerClient();
- ~EmptyContentLayerClient() override;
-
- DISALLOW_COPY_AND_ASSIGN(EmptyContentLayerClient);
-};
-
-} // namespace cc
-
-#endif // CC_LAYERS_EMPTY_CONTENT_LAYER_CLIENT_H_
« no previous file with comments | « cc/BUILD.gn ('k') | cc/layers/empty_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698