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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 virtual bool CoversRect(const gfx::Rect& content_rect, 79 virtual bool CoversRect(const gfx::Rect& content_rect,
80 float contents_scale) const = 0; 80 float contents_scale) const = 0;
81 81
82 // Returns true if this raster source has anything to rasterize. 82 // Returns true if this raster source has anything to rasterize.
83 virtual bool HasRecordings() const = 0; 83 virtual bool HasRecordings() const = 0;
84 84
85 // Informs the raster source that it should attempt to use distance field text 85 // Informs the raster source that it should attempt to use distance field text
86 // during rasterization. 86 // during rasterization.
87 virtual void SetShouldAttemptToUseDistanceFieldText() = 0; 87 virtual void SetShouldAttemptToUseDistanceFieldText() = 0;
88 88
89 virtual void SetBackgoundColor(SkColor background_color) = 0;
90 virtual void SetRequiresClear(bool requires_clear) = 0;
91
92 // Return true iff this raster source would benefit from using distance 89 // Return true iff this raster source would benefit from using distance
93 // field text. 90 // field text.
94 virtual bool ShouldAttemptToUseDistanceFieldText() const = 0; 91 virtual bool ShouldAttemptToUseDistanceFieldText() const = 0;
95 92
96 // Tracing functionality. 93 // Tracing functionality.
97 virtual void DidBeginTracing() = 0; 94 virtual void DidBeginTracing() = 0;
98 virtual void AsValueInto(base::debug::TracedValue* array) const = 0; 95 virtual void AsValueInto(base::trace_event::TracedValue* array) const = 0;
99 virtual skia::RefPtr<SkPicture> GetFlattenedPicture() = 0; 96 virtual skia::RefPtr<SkPicture> GetFlattenedPicture() = 0;
100 virtual size_t GetPictureMemoryUsage() const = 0; 97 virtual size_t GetPictureMemoryUsage() const = 0;
101 98
102 // Return true if LCD anti-aliasing may be used when rastering text. 99 // Return true if LCD anti-aliasing may be used when rastering text.
103 virtual bool CanUseLCDText() const = 0; 100 virtual bool CanUseLCDText() const = 0;
104 101
105 protected: 102 protected:
106 friend class base::RefCountedThreadSafe<RasterSource>; 103 friend class base::RefCountedThreadSafe<RasterSource>;
107 104
108 RasterSource() {} 105 RasterSource() {}
109 virtual ~RasterSource() {} 106 virtual ~RasterSource() {}
110 107
111 private: 108 private:
112 DISALLOW_COPY_AND_ASSIGN(RasterSource); 109 DISALLOW_COPY_AND_ASSIGN(RasterSource);
113 }; 110 };
114 111
115 } // namespace cc 112 } // namespace cc
116 113
117 #endif // CC_RESOURCES_RASTER_SOURCE_H_ 114 #endif // CC_RESOURCES_RASTER_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/resources/pixel_buffer_tile_task_worker_pool.cc ('k') | cc/resources/raster_tile_priority_queue_all.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698