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

Side by Side Diff: cc/picture_pile_impl.h

Issue 12316084: cc: Consolidate the analysis_canvas operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changed analysis location Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_PICTURE_PILE_IMPL_H_ 5 #ifndef CC_PICTURE_PILE_IMPL_H_
6 #define CC_PICTURE_PILE_IMPL_H_ 6 #define CC_PICTURE_PILE_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 std::list<skia::LazyPixelRef*>& pixel_refs); 42 std::list<skia::LazyPixelRef*>& pixel_refs);
43 43
44 void PushPropertiesTo(PicturePileImpl* other); 44 void PushPropertiesTo(PicturePileImpl* other);
45 45
46 skia::RefPtr<SkPicture> GetFlattenedPicture(); 46 skia::RefPtr<SkPicture> GetFlattenedPicture();
47 47
48 void set_slow_down_raster_scale_factor(int factor) { 48 void set_slow_down_raster_scale_factor(int factor) {
49 slow_down_raster_scale_factor_for_debug_ = factor; 49 slow_down_raster_scale_factor_for_debug_ = factor;
50 } 50 }
51 51
52 bool IsCheapInRect(gfx::Rect content_rect, float contents_scale) const; 52 struct Analysis {
53 Analysis();
54
55 bool is_solid_color;
56 bool is_transparent;
Sami 2013/03/05 20:18:31 Could we call this something like is_empty instead
57 bool is_cheap_to_raster;
58 SkColor solid_color;
59 };
60
61 void AnalyzeInRect(const gfx::Rect& content_rect,
62 float contents_scale,
63 Analysis* analysis);
53 64
54 protected: 65 protected:
55 friend class PicturePile; 66 friend class PicturePile;
56 67
57 PicturePileImpl(); 68 PicturePileImpl();
58 virtual ~PicturePileImpl(); 69 virtual ~PicturePileImpl();
59 70
60 typedef std::map<base::PlatformThreadId, scoped_refptr<PicturePileImpl> > 71 typedef std::map<base::PlatformThreadId, scoped_refptr<PicturePileImpl> >
61 CloneMap; 72 CloneMap;
62 CloneMap clones_; 73 CloneMap clones_;
63 74
64 int slow_down_raster_scale_factor_for_debug_; 75 int slow_down_raster_scale_factor_for_debug_;
65 76
66 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); 77 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl);
67 }; 78 };
68 79
69 } // namespace cc 80 } // namespace cc
70 81
71 #endif // CC_PICTURE_PILE_IMPL_H_ 82 #endif // CC_PICTURE_PILE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/picture_layer_tiling_set.cc ('k') | cc/picture_pile_impl.cc » ('j') | cc/picture_pile_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698