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

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

Issue 2235623003: cc: Add gfx::ColorSpace to cc::ResourceProvider resource creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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/resource.h ('k') | cc/resources/resource_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_RESOURCE_POOL_H_ 5 #ifndef CC_RESOURCES_RESOURCE_POOL_H_
6 #define CC_RESOURCES_RESOURCE_POOL_H_ 6 #define CC_RESOURCES_RESOURCE_POOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 26 matching lines...) Expand all
37 37
38 static std::unique_ptr<ResourcePool> Create( 38 static std::unique_ptr<ResourcePool> Create(
39 ResourceProvider* resource_provider, 39 ResourceProvider* resource_provider,
40 base::SingleThreadTaskRunner* task_runner) { 40 base::SingleThreadTaskRunner* task_runner) {
41 return base::WrapUnique( 41 return base::WrapUnique(
42 new ResourcePool(resource_provider, task_runner, false)); 42 new ResourcePool(resource_provider, task_runner, false));
43 } 43 }
44 44
45 ~ResourcePool() override; 45 ~ResourcePool() override;
46 46
47 Resource* AcquireResource(const gfx::Size& size, ResourceFormat format); 47 Resource* AcquireResource(const gfx::Size& size,
48 ResourceFormat format,
49 const gfx::ColorSpace& color_space);
48 50
49 // Tries to acquire the resource with |previous_content_id| for us in partial 51 // Tries to acquire the resource with |previous_content_id| for us in partial
50 // raster. If successful, this function will retun the invalidated rect which 52 // raster. If successful, this function will retun the invalidated rect which
51 // must be re-rastered in |total_invalidated_rect|. 53 // must be re-rastered in |total_invalidated_rect|.
52 Resource* TryAcquireResourceForPartialRaster( 54 Resource* TryAcquireResourceForPartialRaster(
53 uint64_t new_content_id, 55 uint64_t new_content_id,
54 const gfx::Rect& new_invalidated_rect, 56 const gfx::Rect& new_invalidated_rect,
55 uint64_t previous_content_id, 57 uint64_t previous_content_id,
56 gfx::Rect* total_invalidated_rect); 58 gfx::Rect* total_invalidated_rect);
57 59
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 base::TimeDelta resource_expiration_delay_; 161 base::TimeDelta resource_expiration_delay_;
160 162
161 base::WeakPtrFactory<ResourcePool> weak_ptr_factory_; 163 base::WeakPtrFactory<ResourcePool> weak_ptr_factory_;
162 164
163 DISALLOW_COPY_AND_ASSIGN(ResourcePool); 165 DISALLOW_COPY_AND_ASSIGN(ResourcePool);
164 }; 166 };
165 167
166 } // namespace cc 168 } // namespace cc
167 169
168 #endif // CC_RESOURCES_RESOURCE_POOL_H_ 170 #endif // CC_RESOURCES_RESOURCE_POOL_H_
OLDNEW
« no previous file with comments | « cc/resources/resource.h ('k') | cc/resources/resource_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698