OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_RASTER_GPU_RASTERIZER_H_ | |
6 #define CC_RASTER_GPU_RASTERIZER_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/macros.h" | |
11 #include "cc/base/cc_export.h" | |
12 #include "cc/playback/raster_source.h" | |
13 #include "cc/resources/resource_pool.h" | |
14 #include "cc/tiles/tile.h" | |
15 #include "third_party/skia/include/core/SkMultiPictureDraw.h" | |
16 | |
17 namespace cc { | |
18 | |
19 class ContextProvider; | |
20 class RasterSource; | |
21 class ResourceProvider; | |
22 | |
23 class CC_EXPORT GpuRasterizer { | |
24 public: | |
25 ~GpuRasterizer(); | |
26 | |
27 void RasterizeSource(ResourceProvider::ScopedWriteLockGr* write_lock, | |
28 const RasterSource* raster_source, | |
29 const gfx::Rect& raster_full_rect, | |
30 const gfx::Rect& playback_rect, | |
31 float scale, | |
32 const RasterSource::PlaybackSettings& playback_settings); | |
33 | |
34 ResourceProvider* resource_provider() const { return resource_provider_; } | |
35 ContextProvider* worker_context_provider() const { | |
36 return worker_context_provider_; | |
37 } | |
38 | |
39 private: | |
40 GpuRasterizer(ContextProvider* worker_context_provider, | |
41 ResourceProvider* resource_provider, | |
42 bool use_distance_filed_text, | |
43 int msaa_sample_count); | |
44 | |
45 ContextProvider* worker_context_provider_; | |
46 ResourceProvider* resource_provider_; | |
47 | |
48 bool use_distance_field_text_; | |
49 int msaa_sample_count_; | |
50 | |
51 friend class GpuRasterBufferProvider; | |
52 DISALLOW_COPY_AND_ASSIGN(GpuRasterizer); | |
53 }; | |
54 | |
55 } // namespace cc | |
56 | |
57 #endif // CC_RASTER_GPU_RASTERIZER_H_ | |
OLD | NEW |