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

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

Issue 1484163002: Raster display item lists via a visual rect RTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 5 years 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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
(...skipping 16 matching lines...) Expand all
27 int approximate_op_count, 27 int approximate_op_count,
28 size_t external_memory_usage) { 28 size_t external_memory_usage) {
29 is_suitable_for_gpu_rasterization_ = is_suitable_for_gpu_rasterization; 29 is_suitable_for_gpu_rasterization_ = is_suitable_for_gpu_rasterization;
30 approximate_op_count_ = approximate_op_count; 30 approximate_op_count_ = approximate_op_count;
31 external_memory_usage_ = external_memory_usage; 31 external_memory_usage_ = external_memory_usage;
32 } 32 }
33 33
34 virtual void ToProtobuf(proto::DisplayItem* proto) const = 0; 34 virtual void ToProtobuf(proto::DisplayItem* proto) const = 0;
35 virtual void FromProtobuf(const proto::DisplayItem& proto) = 0; 35 virtual void FromProtobuf(const proto::DisplayItem& proto) = 0;
36 virtual void Raster(SkCanvas* canvas, 36 virtual void Raster(SkCanvas* canvas,
37 const gfx::Rect& canvas_target_playback_rect,
38 SkPicture::AbortCallback* callback) const = 0; 37 SkPicture::AbortCallback* callback) const = 0;
39 virtual void AsValueInto(const gfx::Rect& visual_rect, 38 virtual void AsValueInto(const gfx::Rect& visual_rect,
40 base::trace_event::TracedValue* array) const = 0; 39 base::trace_event::TracedValue* array) const = 0;
41 40
42 bool is_suitable_for_gpu_rasterization() const { 41 bool is_suitable_for_gpu_rasterization() const {
43 return is_suitable_for_gpu_rasterization_; 42 return is_suitable_for_gpu_rasterization_;
44 } 43 }
45 int approximate_op_count() const { return approximate_op_count_; } 44 int approximate_op_count() const { return approximate_op_count_; }
46 size_t external_memory_usage() const { return external_memory_usage_; } 45 size_t external_memory_usage() const { return external_memory_usage_; }
47 46
48 protected: 47 protected:
49 DisplayItem(); 48 DisplayItem();
50 49
51 bool is_suitable_for_gpu_rasterization_; 50 bool is_suitable_for_gpu_rasterization_;
52 int approximate_op_count_; 51 int approximate_op_count_;
53 52
54 // The size, in bytes, of the memory owned by this display item but not 53 // The size, in bytes, of the memory owned by this display item but not
55 // allocated within it (e.g. held through scoped_ptr or vector). 54 // allocated within it (e.g. held through scoped_ptr or vector).
56 size_t external_memory_usage_; 55 size_t external_memory_usage_;
57 }; 56 };
58 57
59 } // namespace cc 58 } // namespace cc
60 59
61 #endif // CC_PLAYBACK_DISPLAY_ITEM_H_ 60 #endif // CC_PLAYBACK_DISPLAY_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698