| Index: cc/resources/prioritized_resource.cc
|
| diff --git a/cc/resources/prioritized_resource.cc b/cc/resources/prioritized_resource.cc
|
| index 78fd90055a9a6e05077a7b752a4ca8c8f35f4404..313b275a3abd7658955b20373063a51b7ab0305d 100644
|
| --- a/cc/resources/prioritized_resource.cc
|
| +++ b/cc/resources/prioritized_resource.cc
|
| @@ -15,7 +15,7 @@ namespace cc {
|
|
|
| PrioritizedResource::PrioritizedResource(PrioritizedResourceManager* manager,
|
| gfx::Size size,
|
| - GLenum format)
|
| + ResourceFormat format)
|
| : size_(size),
|
| format_(format),
|
| bytes_(0),
|
| @@ -25,10 +25,7 @@ PrioritizedResource::PrioritizedResource(PrioritizedResourceManager* manager,
|
| is_self_managed_(false),
|
| backing_(NULL),
|
| manager_(NULL) {
|
| - // manager_ is set in RegisterTexture() so validity can be checked.
|
| - DCHECK(format || size.IsEmpty());
|
| - if (format)
|
| - bytes_ = Resource::MemorySizeBytes(size, format);
|
| + bytes_ = Resource::MemorySizeBytes(size, format);
|
| if (manager)
|
| manager->RegisterTexture(this);
|
| }
|
| @@ -48,7 +45,7 @@ void PrioritizedResource::SetTextureManager(
|
| manager->RegisterTexture(this);
|
| }
|
|
|
| -void PrioritizedResource::SetDimensions(gfx::Size size, GLenum format) {
|
| +void PrioritizedResource::SetDimensions(gfx::Size size, ResourceFormat format) {
|
| if (format_ != format || size_ != size) {
|
| is_above_priority_cutoff_ = false;
|
| format_ = format;
|
| @@ -113,7 +110,7 @@ void PrioritizedResource::Unlink() {
|
| }
|
|
|
| void PrioritizedResource::SetToSelfManagedMemoryPlaceholder(size_t bytes) {
|
| - SetDimensions(gfx::Size(), GL_RGBA);
|
| + SetDimensions(gfx::Size(), RGBA_8888);
|
| set_is_self_managed(true);
|
| bytes_ = bytes;
|
| }
|
| @@ -121,7 +118,7 @@ void PrioritizedResource::SetToSelfManagedMemoryPlaceholder(size_t bytes) {
|
| PrioritizedResource::Backing::Backing(unsigned id,
|
| ResourceProvider* resource_provider,
|
| gfx::Size size,
|
| - GLenum format)
|
| + ResourceFormat format)
|
| : Resource(id, size, format),
|
| owner_(NULL),
|
| priority_at_last_priority_update_(PriorityCalculator::LowestPriority()),
|
|
|