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

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

Issue 881513004: Add a command-line flag to set GPU rasterization multisampling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | cc/resources/gpu_rasterizer.cc » ('j') | content/browser/gpu/compositor_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_RESOURCES_GPU_RASTERIZER_H_ 5 #ifndef CC_RESOURCES_GPU_RASTERIZER_H_
6 #define CC_RESOURCES_GPU_RASTERIZER_H_ 6 #define CC_RESOURCES_GPU_RASTERIZER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "cc/resources/rasterizer.h" 11 #include "cc/resources/rasterizer.h"
12 #include "cc/resources/resource_pool.h" 12 #include "cc/resources/resource_pool.h"
13 #include "cc/resources/tile.h" 13 #include "cc/resources/tile.h"
14 #include "third_party/skia/include/core/SkMultiPictureDraw.h" 14 #include "third_party/skia/include/core/SkMultiPictureDraw.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class ContextProvider; 18 class ContextProvider;
19 class ResourceProvider; 19 class ResourceProvider;
20 20
21 class CC_EXPORT GpuRasterizer : public Rasterizer { 21 class CC_EXPORT GpuRasterizer : public Rasterizer {
22 public: 22 public:
23 ~GpuRasterizer() override; 23 ~GpuRasterizer() override;
24 24
25 static scoped_ptr<GpuRasterizer> Create(ContextProvider* context_provider, 25 static scoped_ptr<GpuRasterizer> Create(ContextProvider* context_provider,
26 ResourceProvider* resource_provider, 26 ResourceProvider* resource_provider,
27 bool use_distance_field_text, 27 bool use_distance_field_text,
28 bool tile_prepare_enabled); 28 bool tile_prepare_enabled,
29 int msaa_sample_count);
29 PrepareTilesMode GetPrepareTilesMode() override; 30 PrepareTilesMode GetPrepareTilesMode() override;
30 void RasterizeTiles( 31 void RasterizeTiles(
31 const TileVector& tiles, 32 const TileVector& tiles,
32 ResourcePool* resource_pool, 33 ResourcePool* resource_pool,
33 const UpdateTileDrawInfoCallback& update_tile_draw_info) override; 34 const UpdateTileDrawInfoCallback& update_tile_draw_info) override;
34 35
35 private: 36 private:
36 GpuRasterizer(ContextProvider* context_provider, 37 GpuRasterizer(ContextProvider* context_provider,
37 ResourceProvider* resource_provider, 38 ResourceProvider* resource_provider,
38 bool use_distance_filed_text, 39 bool use_distance_filed_text,
39 bool tile_prepare_enabled); 40 bool tile_prepare_enabled,
41 int msaa_sample_count);
40 42
41 using ScopedResourceWriteLocks = 43 using ScopedResourceWriteLocks =
42 ScopedPtrVector<ResourceProvider::ScopedWriteLockGr>; 44 ScopedPtrVector<ResourceProvider::ScopedWriteLockGr>;
43 45
44 void PerformSolidColorAnalysis(const Tile* tile, 46 void PerformSolidColorAnalysis(const Tile* tile,
45 RasterSource::SolidColorAnalysis* analysis); 47 RasterSource::SolidColorAnalysis* analysis);
46 void AddToMultiPictureDraw(const Tile* tile, 48 void AddToMultiPictureDraw(const Tile* tile,
47 const ScopedResource* resource, 49 const ScopedResource* resource,
48 ScopedResourceWriteLocks* locks); 50 ScopedResourceWriteLocks* locks);
49 51
50 ContextProvider* context_provider_; 52 ContextProvider* context_provider_;
51 ResourceProvider* resource_provider_; 53 ResourceProvider* resource_provider_;
52 SkMultiPictureDraw multi_picture_draw_; 54 SkMultiPictureDraw multi_picture_draw_;
53 55
54 bool use_distance_field_text_; 56 bool use_distance_field_text_;
55 bool tile_prepare_enabled_; 57 bool tile_prepare_enabled_;
58 int msaa_sample_count_;
56 59
57 DISALLOW_COPY_AND_ASSIGN(GpuRasterizer); 60 DISALLOW_COPY_AND_ASSIGN(GpuRasterizer);
58 }; 61 };
59 62
60 } // namespace cc 63 } // namespace cc
61 64
62 #endif // CC_RESOURCES_GPU_RASTERIZER_H_ 65 #endif // CC_RESOURCES_GPU_RASTERIZER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/gpu_rasterizer.cc » ('j') | content/browser/gpu/compositor_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698