Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 ResourceFormat resource_format, | 37 ResourceFormat resource_format, |
| 38 const UpdateTileDrawInfoCallback& update_tile_draw_info) override; | 38 const UpdateTileDrawInfoCallback& update_tile_draw_info) override; |
| 39 | 39 |
| 40 void RasterizeSource(bool use_worker_context, | 40 void RasterizeSource(bool use_worker_context, |
| 41 ResourceProvider::ScopedWriteLockGr* write_lock, | 41 ResourceProvider::ScopedWriteLockGr* write_lock, |
| 42 const RasterSource* raster_source, | 42 const RasterSource* raster_source, |
| 43 const gfx::Rect& rect, | 43 const gfx::Rect& rect, |
| 44 float scale); | 44 float scale); |
| 45 | 45 |
| 46 ResourceProvider* resource_provider() { return resource_provider_; } | 46 ResourceProvider* resource_provider() { return resource_provider_; } |
| 47 void SetZeroMemoryLimit(); | |
| 48 void SetDefaultMemoryLimit(); | |
| 47 | 49 |
| 48 private: | 50 private: |
| 49 GpuRasterizer(ContextProvider* context_provider, | 51 GpuRasterizer(ContextProvider* context_provider, |
| 50 ResourceProvider* resource_provider, | 52 ResourceProvider* resource_provider, |
| 51 bool use_distance_filed_text, | 53 bool use_distance_filed_text, |
| 52 bool threaded_gpu_rasterization_enabled, | 54 bool threaded_gpu_rasterization_enabled, |
| 53 int msaa_sample_count); | 55 int msaa_sample_count); |
| 54 | 56 |
| 55 using ScopedResourceWriteLocks = | 57 using ScopedResourceWriteLocks = |
| 56 ScopedPtrVector<ResourceProvider::ScopedWriteLockGr>; | 58 ScopedPtrVector<ResourceProvider::ScopedWriteLockGr>; |
| 57 | 59 |
| 58 ContextProvider* GetContextProvider(bool worker_context); | 60 ContextProvider* GetContextProvider(bool worker_context); |
| 59 void PerformSolidColorAnalysis(const Tile* tile, | 61 void PerformSolidColorAnalysis(const Tile* tile, |
| 60 RasterSource::SolidColorAnalysis* analysis); | 62 RasterSource::SolidColorAnalysis* analysis); |
| 61 void AddToMultiPictureDraw(const Tile* tile, | 63 void AddToMultiPictureDraw(const Tile* tile, |
| 62 const ScopedResource* resource, | 64 const ScopedResource* resource, |
| 63 ScopedResourceWriteLocks* locks); | 65 ScopedResourceWriteLocks* locks); |
| 64 | 66 |
| 65 ResourceProvider* resource_provider_; | 67 ResourceProvider* resource_provider_; |
| 66 SkMultiPictureDraw multi_picture_draw_; | 68 SkMultiPictureDraw multi_picture_draw_; |
| 67 | 69 |
| 68 bool use_distance_field_text_; | 70 bool use_distance_field_text_; |
| 69 bool threaded_gpu_rasterization_enabled_; | 71 bool threaded_gpu_rasterization_enabled_; |
| 70 int msaa_sample_count_; | 72 int msaa_sample_count_; |
| 73 int maxTextures_; | |
|
vmiura
2015/04/02 19:12:34
nit: maxTextures_ -> max_textures_. maxTextureByt
sohanjg
2015/04/08 09:00:31
Done.
| |
| 74 size_t maxTextureBytes_; | |
| 75 bool cache_cleared_; | |
|
vmiura
2015/04/02 19:12:34
Instead of cache_cleared_, invert to "bool default
sohanjg
2015/04/08 09:00:31
Done.
| |
| 71 | 76 |
| 72 DISALLOW_COPY_AND_ASSIGN(GpuRasterizer); | 77 DISALLOW_COPY_AND_ASSIGN(GpuRasterizer); |
| 73 }; | 78 }; |
| 74 | 79 |
| 75 } // namespace cc | 80 } // namespace cc |
| 76 | 81 |
| 77 #endif // CC_RESOURCES_GPU_RASTERIZER_H_ | 82 #endif // CC_RESOURCES_GPU_RASTERIZER_H_ |
| OLD | NEW |