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

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

Issue 519583003: Use the solid color detection to create solid layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final merge Created 6 years, 3 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/solid_color_layer_impl.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 "cc/resources/picture_pile_base.h" 8 #include "cc/resources/picture_pile_base.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 show_debug_picture_borders_ = show; 44 show_debug_picture_borders_ = show;
45 } 45 }
46 46
47 bool is_suitable_for_gpu_rasterization() const { 47 bool is_suitable_for_gpu_rasterization() const {
48 return is_suitable_for_gpu_rasterization_; 48 return is_suitable_for_gpu_rasterization_;
49 } 49 }
50 void SetUnsuitableForGpuRasterizationForTesting() { 50 void SetUnsuitableForGpuRasterizationForTesting() {
51 is_suitable_for_gpu_rasterization_ = false; 51 is_suitable_for_gpu_rasterization_ = false;
52 } 52 }
53 53
54 bool IsSolidColor() const { return is_solid_color_; }
55 SkColor GetSolidColor() const { return solid_color_; }
56
57 protected: 54 protected:
58 virtual ~PicturePile(); 55 virtual ~PicturePile();
59 56
60 private: 57 private:
61 friend class PicturePileImpl; 58 friend class PicturePileImpl;
62 59
63 void DetermineIfSolidColor(); 60 void DetermineIfSolidColor();
64 61
65 bool is_suitable_for_gpu_rasterization_; 62 bool is_suitable_for_gpu_rasterization_;
66 bool is_solid_color_;
67 SkColor solid_color_;
68 63
69 DISALLOW_COPY_AND_ASSIGN(PicturePile); 64 DISALLOW_COPY_AND_ASSIGN(PicturePile);
70 }; 65 };
71 66
72 } // namespace cc 67 } // namespace cc
73 68
74 #endif // CC_RESOURCES_PICTURE_PILE_H_ 69 #endif // CC_RESOURCES_PICTURE_PILE_H_
OLDNEW
« no previous file with comments | « cc/layers/solid_color_layer_impl.cc ('k') | cc/resources/picture_pile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698