| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RASTER_SOURCE_H_ | 5 #ifndef CC_RESOURCES_RASTER_SOURCE_H_ |
| 6 #define CC_RESOURCES_RASTER_SOURCE_H_ | 6 #define CC_RESOURCES_RASTER_SOURCE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 virtual void SetBackgoundColor(SkColor background_color) = 0; | 89 virtual void SetBackgoundColor(SkColor background_color) = 0; |
| 90 virtual void SetRequiresClear(bool requires_clear) = 0; | 90 virtual void SetRequiresClear(bool requires_clear) = 0; |
| 91 | 91 |
| 92 // Return true iff this raster source would benefit from using distance | 92 // Return true iff this raster source would benefit from using distance |
| 93 // field text. | 93 // field text. |
| 94 virtual bool ShouldAttemptToUseDistanceFieldText() const = 0; | 94 virtual bool ShouldAttemptToUseDistanceFieldText() const = 0; |
| 95 | 95 |
| 96 // Tracing functionality. | 96 // Tracing functionality. |
| 97 virtual void DidBeginTracing() = 0; | 97 virtual void DidBeginTracing() = 0; |
| 98 virtual void AsValueInto(base::debug::TracedValue* array) const = 0; | 98 virtual void AsValueInto(base::trace_event::TracedValue* array) const = 0; |
| 99 virtual skia::RefPtr<SkPicture> GetFlattenedPicture() = 0; | 99 virtual skia::RefPtr<SkPicture> GetFlattenedPicture() = 0; |
| 100 virtual size_t GetPictureMemoryUsage() const = 0; | 100 virtual size_t GetPictureMemoryUsage() const = 0; |
| 101 | 101 |
| 102 // Return true if LCD anti-aliasing may be used when rastering text. | 102 // Return true if LCD anti-aliasing may be used when rastering text. |
| 103 virtual bool CanUseLCDText() const = 0; | 103 virtual bool CanUseLCDText() const = 0; |
| 104 | 104 |
| 105 protected: | 105 protected: |
| 106 friend class base::RefCountedThreadSafe<RasterSource>; | 106 friend class base::RefCountedThreadSafe<RasterSource>; |
| 107 | 107 |
| 108 RasterSource() {} | 108 RasterSource() {} |
| 109 virtual ~RasterSource() {} | 109 virtual ~RasterSource() {} |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 DISALLOW_COPY_AND_ASSIGN(RasterSource); | 112 DISALLOW_COPY_AND_ASSIGN(RasterSource); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace cc | 115 } // namespace cc |
| 116 | 116 |
| 117 #endif // CC_RESOURCES_RASTER_SOURCE_H_ | 117 #endif // CC_RESOURCES_RASTER_SOURCE_H_ |
| OLD | NEW |