OLD | NEW |
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_LAYERS_PICTURE_LAYER_H_ | 5 #ifndef CC_LAYERS_PICTURE_LAYER_H_ |
6 #define CC_LAYERS_PICTURE_LAYER_H_ | 6 #define CC_LAYERS_PICTURE_LAYER_H_ |
7 | 7 |
8 #include "cc/base/invalidation_region.h" | 8 #include "cc/base/invalidation_region.h" |
9 #include "cc/debug/devtools_instrumentation.h" | 9 #include "cc/debug/devtools_instrumentation.h" |
10 #include "cc/debug/micro_benchmark_controller.h" | 10 #include "cc/debug/micro_benchmark_controller.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 const OcclusionTracker<Layer>* occlusion) OVERRIDE; | 34 const OcclusionTracker<Layer>* occlusion) OVERRIDE; |
35 virtual void SetIsMask(bool is_mask) OVERRIDE; | 35 virtual void SetIsMask(bool is_mask) OVERRIDE; |
36 virtual bool SupportsLCDText() const OVERRIDE; | 36 virtual bool SupportsLCDText() const OVERRIDE; |
37 virtual skia::RefPtr<SkPicture> GetPicture() const OVERRIDE; | 37 virtual skia::RefPtr<SkPicture> GetPicture() const OVERRIDE; |
38 | 38 |
39 virtual void RunMicroBenchmark(MicroBenchmark* benchmark) OVERRIDE; | 39 virtual void RunMicroBenchmark(MicroBenchmark* benchmark) OVERRIDE; |
40 | 40 |
41 ContentLayerClient* client() { return client_; } | 41 ContentLayerClient* client() { return client_; } |
42 | 42 |
43 void SetHasGpuRasterizationHint(bool has_hint); | 43 void SetHasGpuRasterizationHint(bool has_hint); |
| 44 bool ShouldUseGpuRasterization() const; |
| 45 |
| 46 PicturePile* GetPicturePileForTesting() const { return pile_.get(); } |
44 | 47 |
45 protected: | 48 protected: |
46 explicit PictureLayer(ContentLayerClient* client); | 49 explicit PictureLayer(ContentLayerClient* client); |
47 virtual ~PictureLayer(); | 50 virtual ~PictureLayer(); |
48 | 51 |
49 private: | 52 private: |
50 ContentLayerClient* client_; | 53 ContentLayerClient* client_; |
51 scoped_refptr<PicturePile> pile_; | 54 scoped_refptr<PicturePile> pile_; |
52 devtools_instrumentation:: | 55 devtools_instrumentation:: |
53 ScopedLayerObjectTracker instrumentation_object_tracker_; | 56 ScopedLayerObjectTracker instrumentation_object_tracker_; |
54 // Invalidation to use the next time update is called. | 57 // Invalidation to use the next time update is called. |
55 InvalidationRegion pending_invalidation_; | 58 InvalidationRegion pending_invalidation_; |
56 // Invalidation from the last time update was called. | 59 // Invalidation from the last time update was called. |
57 Region pile_invalidation_; | 60 Region pile_invalidation_; |
58 gfx::Rect last_updated_visible_content_rect_; | 61 gfx::Rect last_updated_visible_content_rect_; |
59 bool is_mask_; | 62 bool is_mask_; |
60 bool has_gpu_rasterization_hint_; | 63 |
| 64 enum TriBool { TRIBOOL_UNKNOWN, TRIBOOL_FALSE, TRIBOOL_TRUE }; |
| 65 TriBool has_gpu_rasterization_hint_; |
61 | 66 |
62 int update_source_frame_number_; | 67 int update_source_frame_number_; |
63 | 68 |
64 DISALLOW_COPY_AND_ASSIGN(PictureLayer); | 69 DISALLOW_COPY_AND_ASSIGN(PictureLayer); |
65 }; | 70 }; |
66 | 71 |
67 } // namespace cc | 72 } // namespace cc |
68 | 73 |
69 #endif // CC_LAYERS_PICTURE_LAYER_H_ | 74 #endif // CC_LAYERS_PICTURE_LAYER_H_ |
OLD | NEW |