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

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

Issue 1279843004: cc: Plumb more details about pixel refs to tile manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/playback/pixel_ref_map_unittest.cc ('k') | cc/playback/recording_source_unittest.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 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_PLAYBACK_RASTER_SOURCE_H_ 5 #ifndef CC_PLAYBACK_RASTER_SOURCE_H_
6 #define CC_PLAYBACK_RASTER_SOURCE_H_ 6 #define CC_PLAYBACK_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"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/debug/traced_value.h" 12 #include "cc/debug/traced_value.h"
13 #include "skia/ext/pixel_ref_utils.h"
13 #include "skia/ext/refptr.h" 14 #include "skia/ext/refptr.h"
14 #include "third_party/skia/include/core/SkColor.h" 15 #include "third_party/skia/include/core/SkColor.h"
15 #include "third_party/skia/include/core/SkPixelRef.h" 16 #include "third_party/skia/include/core/SkPixelRef.h"
16 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
17 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
18 19
19 class SkCanvas; 20 class SkCanvas;
20 class SkPicture; 21 class SkPicture;
21 22
22 namespace cc { 23 namespace cc {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 65
65 // Returns the color of the raster source if it is solid color. The results 66 // Returns the color of the raster source if it is solid color. The results
66 // are unspecified if IsSolidColor returns false. 67 // are unspecified if IsSolidColor returns false.
67 virtual SkColor GetSolidColor() const = 0; 68 virtual SkColor GetSolidColor() const = 0;
68 69
69 // Returns the size of this raster source. 70 // Returns the size of this raster source.
70 virtual gfx::Size GetSize() const = 0; 71 virtual gfx::Size GetSize() const = 0;
71 72
72 // Populate the given list with all SkPixelRefs that may overlap the given 73 // Populate the given list with all SkPixelRefs that may overlap the given
73 // rect at given scale. 74 // rect at given scale.
74 virtual void GatherPixelRefs(const gfx::Rect& content_rect, 75 virtual void GatherPixelRefs(
75 float contents_scale, 76 const gfx::Rect& content_rect,
76 std::vector<SkPixelRef*>* pixel_refs) const = 0; 77 float contents_scale,
78 std::vector<skia::PositionPixelRef>* pixel_refs) const = 0;
77 79
78 // Return true iff this raster source can raster the given rect at given 80 // Return true iff this raster source can raster the given rect at given
79 // scale. 81 // scale.
80 virtual bool CoversRect(const gfx::Rect& content_rect, 82 virtual bool CoversRect(const gfx::Rect& content_rect,
81 float contents_scale) const = 0; 83 float contents_scale) const = 0;
82 84
83 // Returns true if this raster source has anything to rasterize. 85 // Returns true if this raster source has anything to rasterize.
84 virtual bool HasRecordings() const = 0; 86 virtual bool HasRecordings() const = 0;
85 87
86 // Informs the raster source that it should attempt to use distance field text 88 // Informs the raster source that it should attempt to use distance field text
(...skipping 21 matching lines...) Expand all
108 RasterSource() {} 110 RasterSource() {}
109 virtual ~RasterSource() {} 111 virtual ~RasterSource() {}
110 112
111 private: 113 private:
112 DISALLOW_COPY_AND_ASSIGN(RasterSource); 114 DISALLOW_COPY_AND_ASSIGN(RasterSource);
113 }; 115 };
114 116
115 } // namespace cc 117 } // namespace cc
116 118
117 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ 119 #endif // CC_PLAYBACK_RASTER_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/playback/pixel_ref_map_unittest.cc ('k') | cc/playback/recording_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698