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

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

Issue 1158553004: cc: Cull DrawingDisplayItems outside of the raster playback rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cull: . Created 5 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
« no previous file with comments | « cc/playback/clip_path_display_item.cc ('k') | cc/playback/compositing_display_item.cc » ('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 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 "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/playback/display_item.h" 10 #include "cc/playback/display_item.h"
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 CompositingDisplayItem(); 23 CompositingDisplayItem();
24 ~CompositingDisplayItem() override; 24 ~CompositingDisplayItem() override;
25 25
26 void SetNew(uint8_t alpha, 26 void SetNew(uint8_t alpha,
27 SkXfermode::Mode xfermode, 27 SkXfermode::Mode xfermode,
28 SkRect* bounds, 28 SkRect* bounds,
29 skia::RefPtr<SkColorFilter> color_filter); 29 skia::RefPtr<SkColorFilter> color_filter);
30 30
31 void Raster(SkCanvas* canvas, 31 void Raster(SkCanvas* canvas,
32 const gfx::Rect& canvas_target_playback_rect,
32 SkPicture::AbortCallback* callback) const override; 33 SkPicture::AbortCallback* callback) const override;
33 void AsValueInto(base::trace_event::TracedValue* array) const override; 34 void AsValueInto(base::trace_event::TracedValue* array) const override;
34 35
35 private: 36 private:
36 uint8_t alpha_; 37 uint8_t alpha_;
37 SkXfermode::Mode xfermode_; 38 SkXfermode::Mode xfermode_;
38 bool has_bounds_; 39 bool has_bounds_;
39 SkRect bounds_; 40 SkRect bounds_;
40 skia::RefPtr<SkColorFilter> color_filter_; 41 skia::RefPtr<SkColorFilter> color_filter_;
41 }; 42 };
42 43
43 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem { 44 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem {
44 public: 45 public:
45 EndCompositingDisplayItem(); 46 EndCompositingDisplayItem();
46 ~EndCompositingDisplayItem() override; 47 ~EndCompositingDisplayItem() override;
47 48
48 static scoped_ptr<EndCompositingDisplayItem> Create() { 49 static scoped_ptr<EndCompositingDisplayItem> Create() {
49 return make_scoped_ptr(new EndCompositingDisplayItem()); 50 return make_scoped_ptr(new EndCompositingDisplayItem());
50 } 51 }
51 52
52 void Raster(SkCanvas* canvas, 53 void Raster(SkCanvas* canvas,
54 const gfx::Rect& canvas_target_playback_rect,
53 SkPicture::AbortCallback* callback) const override; 55 SkPicture::AbortCallback* callback) const override;
54 void AsValueInto(base::trace_event::TracedValue* array) const override; 56 void AsValueInto(base::trace_event::TracedValue* array) const override;
55 }; 57 };
56 58
57 } // namespace cc 59 } // namespace cc
58 60
59 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ 61 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/playback/clip_path_display_item.cc ('k') | cc/playback/compositing_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698