OLD | NEW |
---|---|
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/resources/drawing_display_item.h" | 5 #include "cc/resources/drawing_display_item.h" |
6 | 6 |
7 #include "third_party/skia/include/core/SkCanvas.h" | 7 #include "third_party/skia/include/core/SkCanvas.h" |
8 #include "third_party/skia/include/core/SkDrawPictureCallback.h" | |
danakj
2015/01/06 15:42:46
A forward declaration seems like enough here?
robertphillips
2015/01/06 16:08:09
This include will go away after the Skia-side rena
| |
8 #include "third_party/skia/include/core/SkMatrix.h" | 9 #include "third_party/skia/include/core/SkMatrix.h" |
9 #include "third_party/skia/include/core/SkPicture.h" | 10 #include "third_party/skia/include/core/SkPicture.h" |
10 #include "third_party/skia/include/utils/SkPictureUtils.h" | 11 #include "third_party/skia/include/utils/SkPictureUtils.h" |
11 | 12 |
12 namespace cc { | 13 namespace cc { |
13 | 14 |
14 DrawingDisplayItem::DrawingDisplayItem(skia::RefPtr<SkPicture> picture, | 15 DrawingDisplayItem::DrawingDisplayItem(skia::RefPtr<SkPicture> picture, |
15 gfx::PointF location) | 16 gfx::PointF location) |
16 : picture_(picture), location_(location) { | 17 : picture_(picture), location_(location) { |
17 } | 18 } |
(...skipping 19 matching lines...) Expand all Loading... | |
37 int DrawingDisplayItem::ApproximateOpCount() const { | 38 int DrawingDisplayItem::ApproximateOpCount() const { |
38 return picture_->approximateOpCount() + sizeof(gfx::PointF); | 39 return picture_->approximateOpCount() + sizeof(gfx::PointF); |
39 } | 40 } |
40 | 41 |
41 size_t DrawingDisplayItem::PictureMemoryUsage() const { | 42 size_t DrawingDisplayItem::PictureMemoryUsage() const { |
42 DCHECK(picture_); | 43 DCHECK(picture_); |
43 return SkPictureUtils::ApproximateBytesUsed(picture_.get()); | 44 return SkPictureUtils::ApproximateBytesUsed(picture_.get()); |
44 } | 45 } |
45 | 46 |
46 } // namespace cc | 47 } // namespace cc |
OLD | NEW |