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

Side by Side Diff: cc/paint/drawing_display_item.cc

Issue 2894843002: Revert of Remove cullRect() from PaintOpBuffer. (Closed)
Patch Set: rebase TestExpectations Created 3 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/paint/drawing_display_item.h ('k') | cc/paint/paint_op_buffer.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/paint/drawing_display_item.h" 5 #include "cc/paint/drawing_display_item.h"
6 6
7 #include "third_party/skia/include/core/SkPicture.h" 7 #include "third_party/skia/include/core/SkPicture.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 DrawingDisplayItem::DrawingDisplayItem() : DisplayItem(DRAWING) {} 11 DrawingDisplayItem::DrawingDisplayItem() : DisplayItem(DRAWING) {}
12 12
13 DrawingDisplayItem::DrawingDisplayItem(sk_sp<const PaintRecord> record, 13 DrawingDisplayItem::DrawingDisplayItem(sk_sp<const PaintRecord> record)
14 const SkRect& bounds) 14 : DisplayItem(DRAWING), picture(std::move(record)) {}
15 : DisplayItem(DRAWING), picture(std::move(record)), bounds(bounds) {}
16 15
17 DrawingDisplayItem::DrawingDisplayItem(const DrawingDisplayItem& item) 16 DrawingDisplayItem::DrawingDisplayItem(const DrawingDisplayItem& item)
18 : DisplayItem(DRAWING), picture(item.picture) {} 17 : DisplayItem(DRAWING), picture(item.picture) {}
19 18
20 DrawingDisplayItem::~DrawingDisplayItem() = default; 19 DrawingDisplayItem::~DrawingDisplayItem() = default;
21 20
22 size_t DrawingDisplayItem::ExternalMemoryUsage() const { 21 size_t DrawingDisplayItem::ExternalMemoryUsage() const {
23 return picture->bytes_used(); 22 return picture->bytes_used();
24 } 23 }
25 24
26 DISABLE_CFI_PERF 25 DISABLE_CFI_PERF
27 size_t DrawingDisplayItem::OpCount() const { 26 size_t DrawingDisplayItem::OpCount() const {
28 return picture->size(); 27 return picture->size();
29 } 28 }
30 29
31 } // namespace cc 30 } // namespace cc
OLDNEW
« no previous file with comments | « cc/paint/drawing_display_item.h ('k') | cc/paint/paint_op_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698