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

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

Issue 1819683002: Use sk_sp-based picture recording APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: skspify GetPicture/GetFlattenedPicture Created 4 years, 9 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/display_item_list_unittest.cc ('k') | cc/playback/display_list_raster_source.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_DISPLAY_LIST_RASTER_SOURCE_H_ 5 #ifndef CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_
6 #define CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ 6 #define CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "base/trace_event/memory_allocator_dump.h" 15 #include "base/trace_event/memory_allocator_dump.h"
16 #include "base/trace_event/memory_dump_provider.h" 16 #include "base/trace_event/memory_dump_provider.h"
17 #include "cc/base/cc_export.h" 17 #include "cc/base/cc_export.h"
18 #include "cc/debug/rendering_stats_instrumentation.h" 18 #include "cc/debug/rendering_stats_instrumentation.h"
19 #include "cc/playback/display_list_recording_source.h" 19 #include "cc/playback/display_list_recording_source.h"
20 #include "skia/ext/analysis_canvas.h" 20 #include "skia/ext/analysis_canvas.h"
21 #include "skia/ext/refptr.h"
22 #include "third_party/skia/include/core/SkPicture.h" 21 #include "third_party/skia/include/core/SkPicture.h"
23 22
24 namespace cc { 23 namespace cc {
25 class DisplayItemList; 24 class DisplayItemList;
26 class DrawImage; 25 class DrawImage;
27 class ImageDecodeController; 26 class ImageDecodeController;
28 27
29 class CC_EXPORT DisplayListRasterSource 28 class CC_EXPORT DisplayListRasterSource
30 : public base::trace_event::MemoryDumpProvider, 29 : public base::trace_event::MemoryDumpProvider,
31 public base::RefCountedThreadSafe<DisplayListRasterSource> { 30 public base::RefCountedThreadSafe<DisplayListRasterSource> {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // during rasterization. 95 // during rasterization.
97 virtual void SetShouldAttemptToUseDistanceFieldText(); 96 virtual void SetShouldAttemptToUseDistanceFieldText();
98 97
99 // Return true iff this raster source would benefit from using distance 98 // Return true iff this raster source would benefit from using distance
100 // field text. 99 // field text.
101 virtual bool ShouldAttemptToUseDistanceFieldText() const; 100 virtual bool ShouldAttemptToUseDistanceFieldText() const;
102 101
103 // Tracing functionality. 102 // Tracing functionality.
104 virtual void DidBeginTracing(); 103 virtual void DidBeginTracing();
105 virtual void AsValueInto(base::trace_event::TracedValue* array) const; 104 virtual void AsValueInto(base::trace_event::TracedValue* array) const;
106 virtual skia::RefPtr<SkPicture> GetFlattenedPicture(); 105 virtual sk_sp<SkPicture> GetFlattenedPicture();
107 virtual size_t GetPictureMemoryUsage() const; 106 virtual size_t GetPictureMemoryUsage() const;
108 107
109 // Return true if LCD anti-aliasing may be used when rastering text. 108 // Return true if LCD anti-aliasing may be used when rastering text.
110 virtual bool CanUseLCDText() const; 109 virtual bool CanUseLCDText() const;
111 110
112 scoped_refptr<DisplayListRasterSource> CreateCloneWithoutLCDText() const; 111 scoped_refptr<DisplayListRasterSource> CreateCloneWithoutLCDText() const;
113 112
114 // Image decode controller should be set once. Its lifetime has to exceed that 113 // Image decode controller should be set once. Its lifetime has to exceed that
115 // of the raster source, since the raster source will access it during raster. 114 // of the raster source, since the raster source will access it during raster.
116 void SetImageDecodeController(ImageDecodeController* image_decode_controller); 115 void SetImageDecodeController(ImageDecodeController* image_decode_controller);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 168
170 // Used to ensure that memory dump logic always happens on the same thread. 169 // Used to ensure that memory dump logic always happens on the same thread.
171 base::ThreadChecker memory_dump_thread_checker_; 170 base::ThreadChecker memory_dump_thread_checker_;
172 171
173 DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource); 172 DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource);
174 }; 173 };
175 174
176 } // namespace cc 175 } // namespace cc
177 176
178 #endif // CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ 177 #endif // CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/playback/display_item_list_unittest.cc ('k') | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698