Add test for clicking bookmark star in presence of ctrl-D keybinding
[chromium-blink-merge.git] / cc / resources / gpu_rasterizer.h
blobcbc93853c192299283e507145dd492ceb1327d44
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.
5 #ifndef CC_RESOURCES_GPU_RASTERIZER_H_
6 #define CC_RESOURCES_GPU_RASTERIZER_H_
8 #include <vector>
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"
16 namespace cc {
18 class ContextProvider;
19 class ResourceProvider;
21 class CC_EXPORT GpuRasterizer : public Rasterizer {
22 public:
23 ~GpuRasterizer() override;
25 static scoped_ptr<GpuRasterizer> Create(ContextProvider* context_provider,
26 ResourceProvider* resource_provider,
27 bool use_distance_field_text,
28 bool tile_prepare_enabled);
29 PrepareTilesMode GetPrepareTilesMode() override;
30 void RasterizeTiles(
31 const TileVector& tiles,
32 ResourcePool* resource_pool,
33 const UpdateTileDrawInfoCallback& update_tile_draw_info) override;
35 private:
36 GpuRasterizer(ContextProvider* context_provider,
37 ResourceProvider* resource_provider,
38 bool use_distance_filed_text,
39 bool tile_prepare_enabled);
41 using ScopedResourceWriteLocks =
42 ScopedPtrVector<ResourceProvider::ScopedWriteLockGr>;
44 void PerformSolidColorAnalysis(const Tile* tile,
45 RasterSource::SolidColorAnalysis* analysis);
46 void AddToMultiPictureDraw(const Tile* tile,
47 const ScopedResource* resource,
48 ScopedResourceWriteLocks* locks);
50 ContextProvider* context_provider_;
51 ResourceProvider* resource_provider_;
52 SkMultiPictureDraw multi_picture_draw_;
54 bool use_distance_field_text_;
55 bool tile_prepare_enabled_;
57 DISALLOW_COPY_AND_ASSIGN(GpuRasterizer);
60 } // namespace cc
62 #endif // CC_RESOURCES_GPU_RASTERIZER_H_