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

Side by Side Diff: cc/resources/picture_pile_impl.h

Issue 14205005: cc: Only consider layer clipped content rect for analysis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: linker fixes on windows Created 7 years, 8 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/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/picture_pile_impl.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 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_RESOURCES_PICTURE_PILE_IMPL_H_ 5 #ifndef CC_RESOURCES_PICTURE_PILE_IMPL_H_
6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_ 6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 26 matching lines...) Expand all
37 gfx::Rect canvas_rect, 37 gfx::Rect canvas_rect,
38 float contents_scale); 38 float contents_scale);
39 39
40 void GatherPixelRefs( 40 void GatherPixelRefs(
41 gfx::Rect content_rect, 41 gfx::Rect content_rect,
42 float contents_scale, 42 float contents_scale,
43 std::list<skia::LazyPixelRef*>& pixel_refs); 43 std::list<skia::LazyPixelRef*>& pixel_refs);
44 44
45 skia::RefPtr<SkPicture> GetFlattenedPicture(); 45 skia::RefPtr<SkPicture> GetFlattenedPicture();
46 46
47 struct Analysis { 47 struct CC_EXPORT Analysis {
48 Analysis(); 48 Analysis();
49 ~Analysis(); 49 ~Analysis();
50 50
51 bool is_solid_color; 51 bool is_solid_color;
52 bool is_transparent; 52 bool is_transparent;
53 bool has_text; 53 bool has_text;
54 bool is_cheap_to_raster; 54 bool is_cheap_to_raster;
55 SkColor solid_color; 55 SkColor solid_color;
56 56
57 skia::AnalysisCanvas::LazyPixelRefList lazy_pixel_refs; 57 skia::AnalysisCanvas::LazyPixelRefList lazy_pixel_refs;
58 }; 58 };
59 59
60 void AnalyzeInRect(const gfx::Rect& content_rect, 60 void AnalyzeInRect(gfx::Rect content_rect,
61 float contents_scale, 61 float contents_scale,
62 Analysis* analysis); 62 Analysis* analysis);
63 63
64 protected: 64 protected:
65 friend class PicturePile; 65 friend class PicturePile;
66 66
67 explicit PicturePileImpl(bool enable_lcd_text); 67 explicit PicturePileImpl(bool enable_lcd_text);
68 PicturePileImpl(const PicturePileBase* other, bool enable_lcd_text); 68 PicturePileImpl(const PicturePileBase* other, bool enable_lcd_text);
69 virtual ~PicturePileImpl(); 69 virtual ~PicturePileImpl();
70 70
(...skipping 19 matching lines...) Expand all
90 // instance. This member variable must be last so that other member 90 // instance. This member variable must be last so that other member
91 // variables have already been initialized and can be clonable. 91 // variables have already been initialized and can be clonable.
92 const ClonesForDrawing clones_for_drawing_; 92 const ClonesForDrawing clones_for_drawing_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); 94 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl);
95 }; 95 };
96 96
97 } // namespace cc 97 } // namespace cc
98 98
99 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ 99 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/picture_pile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698