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

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

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/resources/picture_layer_tiling_set_unittest.cc ('k') | cc/resources/picture_pile.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_H_ 5 #ifndef CC_RESOURCES_PICTURE_PILE_H_
6 #define CC_RESOURCES_PICTURE_PILE_H_ 6 #define CC_RESOURCES_PICTURE_PILE_H_
7 7
8 #include "base/memory/ref_counted.h"
8 #include "cc/resources/picture_pile_base.h" 9 #include "cc/resources/picture_pile_base.h"
9 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
10 11
11 namespace cc { 12 namespace cc {
12 class PicturePileImpl; 13 class PicturePileImpl;
13 class Region; 14 class Region;
14 class RenderingStatsInstrumentation; 15 class RenderingStatsInstrumentation;
15 16
16 class CC_EXPORT PicturePile : public PicturePileBase { 17 class CC_EXPORT PicturePile : public PicturePileBase {
17 public: 18 public:
18 PicturePile(); 19 PicturePile();
20 ~PicturePile() override;
19 21
20 // Re-record parts of the picture that are invalid. 22 // Re-record parts of the picture that are invalid.
21 // Invalidations are in layer space, and will be expanded to cover everything 23 // Invalidations are in layer space, and will be expanded to cover everything
22 // that was either recorded/changed or that has no recording, leaving out only 24 // that was either recorded/changed or that has no recording, leaving out only
23 // pieces that we had a recording for and it was not changed. 25 // pieces that we had a recording for and it was not changed.
24 // Return true iff the pile was modified. 26 // Return true iff the pile was modified.
25 bool UpdateAndExpandInvalidation( 27 bool UpdateAndExpandInvalidation(
26 ContentLayerClient* painter, 28 ContentLayerClient* painter,
27 Region* invalidation, 29 Region* invalidation,
28 SkColor background_color, 30 SkColor background_color,
(...skipping 17 matching lines...) Expand all
46 48
47 bool is_suitable_for_gpu_rasterization() const { 49 bool is_suitable_for_gpu_rasterization() const {
48 return is_suitable_for_gpu_rasterization_; 50 return is_suitable_for_gpu_rasterization_;
49 } 51 }
50 void SetUnsuitableForGpuRasterizationForTesting() { 52 void SetUnsuitableForGpuRasterizationForTesting() {
51 is_suitable_for_gpu_rasterization_ = false; 53 is_suitable_for_gpu_rasterization_ = false;
52 } 54 }
53 55
54 void SetPixelRecordDistanceForTesting(int d) { pixel_record_distance_ = d; } 56 void SetPixelRecordDistanceForTesting(int d) { pixel_record_distance_ = d; }
55 57
56 protected:
57 ~PicturePile() override;
58
59 private: 58 private:
60 friend class PicturePileImpl; 59 friend class PicturePileImpl;
61 60
62 void DetermineIfSolidColor(); 61 void DetermineIfSolidColor();
63 62
64 bool is_suitable_for_gpu_rasterization_; 63 bool is_suitable_for_gpu_rasterization_;
65 int pixel_record_distance_; 64 int pixel_record_distance_;
66 65
67 DISALLOW_COPY_AND_ASSIGN(PicturePile); 66 DISALLOW_COPY_AND_ASSIGN(PicturePile);
68 }; 67 };
69 68
70 } // namespace cc 69 } // namespace cc
71 70
72 #endif // CC_RESOURCES_PICTURE_PILE_H_ 71 #endif // CC_RESOURCES_PICTURE_PILE_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_set_unittest.cc ('k') | cc/resources/picture_pile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698