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

Side by Side Diff: cc/playback/display_item.h

Issue 1982893002: [blimp] Add SkPicture caching support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git merge origin/master Created 4 years, 6 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
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 #ifndef CC_PLAYBACK_DISPLAY_ITEM_H_ 5 #ifndef CC_PLAYBACK_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_DISPLAY_ITEM_H_ 6 #define CC_PLAYBACK_DISPLAY_ITEM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
13 #include "cc/debug/traced_value.h" 13 #include "cc/debug/traced_value.h"
14 #include "third_party/skia/include/core/SkPicture.h" 14 #include "third_party/skia/include/core/SkPicture.h"
15 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
16 16
17 class SkCanvas; 17 class SkCanvas;
18 18
19 namespace cc { 19 namespace cc {
20 class ImageSerializationProcessor; 20 class EnginePictureCache;
21 21
22 namespace proto { 22 namespace proto {
23 class DisplayItem; 23 class DisplayItem;
24 } // namespace proto 24 } // namespace proto
25 25
26 class CC_EXPORT DisplayItem { 26 class CC_EXPORT DisplayItem {
27 public: 27 public:
28 virtual ~DisplayItem() {} 28 virtual ~DisplayItem() {}
29 29
30 virtual void ToProtobuf( 30 virtual void ToProtobuf(proto::DisplayItem* proto) const = 0;
31 proto::DisplayItem* proto, 31 virtual void MarkForRegistrationEngine(
32 ImageSerializationProcessor* image_serialization_processor) const = 0; 32 EnginePictureCache* engine_picture_cache) const;
33 virtual void MarkForUnregistrationEngine(
34 EnginePictureCache* engine_picture_cache) const;
33 virtual void Raster(SkCanvas* canvas, 35 virtual void Raster(SkCanvas* canvas,
34 const gfx::Rect& canvas_target_playback_rect, 36 const gfx::Rect& canvas_target_playback_rect,
35 SkPicture::AbortCallback* callback) const = 0; 37 SkPicture::AbortCallback* callback) const = 0;
36 virtual void AsValueInto(const gfx::Rect& visual_rect, 38 virtual void AsValueInto(const gfx::Rect& visual_rect,
37 base::trace_event::TracedValue* array) const = 0; 39 base::trace_event::TracedValue* array) const = 0;
38 // For tracing. 40 // For tracing.
39 virtual size_t ExternalMemoryUsage() const = 0; 41 virtual size_t ExternalMemoryUsage() const = 0;
40 42
41 protected: 43 protected:
42 DisplayItem(); 44 DisplayItem();
43 }; 45 };
44 46
45 } // namespace cc 47 } // namespace cc
46 48
47 #endif // CC_PLAYBACK_DISPLAY_ITEM_H_ 49 #endif // CC_PLAYBACK_DISPLAY_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698