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

Unified Diff: cc/playback/drawing_display_item.cc

Issue 2748263002: Move cc::DisplayItemList and related classes into cc/paint/ (Closed)
Patch Set: none 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
Index: cc/playback/drawing_display_item.cc
diff --git a/cc/playback/drawing_display_item.cc b/cc/playback/drawing_display_item.cc
deleted file mode 100644
index a6d2274c26fb0324c9ea97cfdda6262dca53696a..0000000000000000000000000000000000000000
--- a/cc/playback/drawing_display_item.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2014 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.
-
-#include "cc/playback/drawing_display_item.h"
-
-#include <stddef.h>
-
-#include <string>
-
-#include "base/strings/stringprintf.h"
-#include "base/trace_event/trace_event.h"
-#include "base/trace_event/trace_event_argument.h"
-#include "base/values.h"
-#include "cc/debug/picture_debug_util.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "ui/gfx/skia_util.h"
-
-namespace cc {
-
-DrawingDisplayItem::DrawingDisplayItem() : DisplayItem(DRAWING) {}
-
-DrawingDisplayItem::DrawingDisplayItem(sk_sp<const PaintRecord> record)
- : DisplayItem(DRAWING) {
- SetNew(std::move(record));
-}
-
-DrawingDisplayItem::DrawingDisplayItem(const DrawingDisplayItem& item)
- : DisplayItem(DRAWING) {
- item.CloneTo(this);
-}
-
-DrawingDisplayItem::~DrawingDisplayItem() {
-}
-
-void DrawingDisplayItem::SetNew(sk_sp<const PaintRecord> record) {
- picture_ = std::move(record);
-}
-
-DISABLE_CFI_PERF
-void DrawingDisplayItem::Raster(SkCanvas* canvas,
- SkPicture::AbortCallback* callback) const {
- if (canvas->quickReject(picture_->cullRect()))
- return;
-
- // SkPicture always does a wrapping save/restore on the canvas, so it is not
- // necessary here.
- if (callback) {
- picture_->playback(canvas, callback);
- } else {
- // TODO(enne): switch this to playback once PaintRecord is real.
- canvas->drawPicture(ToSkPicture(picture_.get()));
- }
-}
-
-void DrawingDisplayItem::CloneTo(DrawingDisplayItem* item) const {
- item->SetNew(picture_);
-}
-
-size_t DrawingDisplayItem::ExternalMemoryUsage() const {
- return picture_->approximateBytesUsed();
-}
-
-DISABLE_CFI_PERF
-int DrawingDisplayItem::ApproximateOpCount() const {
- return picture_->approximateOpCount();
-}
-
-} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698