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

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

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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/resources/float_clip_display_item.cc ('k') | cc/resources/gpu_rasterizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_RESOURCES_GPU_RASTERIZER_H_
6 #define CC_RESOURCES_GPU_RASTERIZER_H_
7
8 #include <vector>
9
10 #include "cc/base/cc_export.h"
11 #include "cc/resources/rasterizer.h"
12 #include "cc/resources/resource_pool.h"
13 #include "cc/resources/tile.h"
14 #include "third_party/skia/include/core/SkMultiPictureDraw.h"
15
16 namespace cc {
17
18 class ContextProvider;
19 class ResourceProvider;
20
21 class CC_EXPORT GpuRasterizer : public Rasterizer {
22 public:
23 ~GpuRasterizer() override;
24
25 static scoped_ptr<GpuRasterizer> Create(
26 ContextProvider* context_provider,
27 ResourceProvider* resource_provider,
28 bool use_distance_field_text,
29 bool threaded_gpu_rasterization_enabled,
30 int msaa_sample_count);
31
32 // Overriden from Rasterizer.
33 PrepareTilesMode GetPrepareTilesMode() override;
34 void RasterizeTiles(
35 const TileVector& tiles,
36 ResourcePool* resource_pool,
37 ResourceFormat resource_format,
38 const UpdateTileDrawInfoCallback& update_tile_draw_info) override;
39
40 void RasterizeSource(bool use_worker_context,
41 ResourceProvider::ScopedWriteLockGr* write_lock,
42 const RasterSource* raster_source,
43 const gfx::Rect& rect,
44 float scale);
45
46 ResourceProvider* resource_provider() { return resource_provider_; }
47
48 private:
49 GpuRasterizer(ContextProvider* context_provider,
50 ResourceProvider* resource_provider,
51 bool use_distance_filed_text,
52 bool threaded_gpu_rasterization_enabled,
53 int msaa_sample_count);
54
55 using ScopedResourceWriteLocks =
56 ScopedPtrVector<ResourceProvider::ScopedWriteLockGr>;
57
58 ContextProvider* GetContextProvider(bool worker_context);
59 void PerformSolidColorAnalysis(const Tile* tile,
60 RasterSource::SolidColorAnalysis* analysis);
61 void AddToMultiPictureDraw(const Tile* tile,
62 const ScopedResource* resource,
63 ScopedResourceWriteLocks* locks);
64
65 ResourceProvider* resource_provider_;
66 SkMultiPictureDraw multi_picture_draw_;
67
68 bool use_distance_field_text_;
69 bool threaded_gpu_rasterization_enabled_;
70 int msaa_sample_count_;
71
72 DISALLOW_COPY_AND_ASSIGN(GpuRasterizer);
73 };
74
75 } // namespace cc
76
77 #endif // CC_RESOURCES_GPU_RASTERIZER_H_
OLDNEW
« no previous file with comments | « cc/resources/float_clip_display_item.cc ('k') | cc/resources/gpu_rasterizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698