| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_COMPOSITING_DISPLAY_ITEM_H_ | 5 #ifndef CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ |
| 6 #define CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ | 6 #define CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 sk_sp<SkColorFilter> color_filter, | 30 sk_sp<SkColorFilter> color_filter, |
| 31 bool lcd_text_requires_opaque_layer); | 31 bool lcd_text_requires_opaque_layer); |
| 32 explicit CompositingDisplayItem(const proto::DisplayItem& proto); | 32 explicit CompositingDisplayItem(const proto::DisplayItem& proto); |
| 33 ~CompositingDisplayItem() override; | 33 ~CompositingDisplayItem() override; |
| 34 | 34 |
| 35 void ToProtobuf(proto::DisplayItem* proto) const override; | 35 void ToProtobuf(proto::DisplayItem* proto) const override; |
| 36 void Raster(SkCanvas* canvas, | 36 void Raster(SkCanvas* canvas, |
| 37 SkPicture::AbortCallback* callback) const override; | 37 SkPicture::AbortCallback* callback) const override; |
| 38 void AsValueInto(const gfx::Rect& visual_rect, | 38 void AsValueInto(const gfx::Rect& visual_rect, |
| 39 base::trace_event::TracedValue* array) const override; | 39 base::trace_event::TracedValue* array) const override; |
| 40 size_t ExternalMemoryUsage() const override; | |
| 41 | 40 |
| 41 size_t ExternalMemoryUsage() const { |
| 42 // TODO(pdr): Include color_filter's memory here. |
| 43 return 0; |
| 44 } |
| 42 int ApproximateOpCount() const { return 1; } | 45 int ApproximateOpCount() const { return 1; } |
| 43 | 46 |
| 44 private: | 47 private: |
| 45 void SetNew(uint8_t alpha, | 48 void SetNew(uint8_t alpha, |
| 46 SkBlendMode xfermode, | 49 SkBlendMode xfermode, |
| 47 SkRect* bounds, | 50 SkRect* bounds, |
| 48 sk_sp<SkColorFilter> color_filter, | 51 sk_sp<SkColorFilter> color_filter, |
| 49 bool lcd_text_requires_opaque_layer); | 52 bool lcd_text_requires_opaque_layer); |
| 50 | 53 |
| 51 uint8_t alpha_; | 54 uint8_t alpha_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 64 | 67 |
| 65 static std::unique_ptr<EndCompositingDisplayItem> Create() { | 68 static std::unique_ptr<EndCompositingDisplayItem> Create() { |
| 66 return base::MakeUnique<EndCompositingDisplayItem>(); | 69 return base::MakeUnique<EndCompositingDisplayItem>(); |
| 67 } | 70 } |
| 68 | 71 |
| 69 void ToProtobuf(proto::DisplayItem* proto) const override; | 72 void ToProtobuf(proto::DisplayItem* proto) const override; |
| 70 void Raster(SkCanvas* canvas, | 73 void Raster(SkCanvas* canvas, |
| 71 SkPicture::AbortCallback* callback) const override; | 74 SkPicture::AbortCallback* callback) const override; |
| 72 void AsValueInto(const gfx::Rect& visual_rect, | 75 void AsValueInto(const gfx::Rect& visual_rect, |
| 73 base::trace_event::TracedValue* array) const override; | 76 base::trace_event::TracedValue* array) const override; |
| 74 size_t ExternalMemoryUsage() const override; | |
| 75 | 77 |
| 76 int ApproximateOpCount() const { return 0; } | 78 int ApproximateOpCount() const { return 0; } |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 } // namespace cc | 81 } // namespace cc |
| 80 | 82 |
| 81 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ | 83 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ |
| OLD | NEW |