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

Unified Diff: cc/resources/prioritized_resource.cc

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix raster-on-demand codepath Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: cc/resources/prioritized_resource.cc
diff --git a/cc/resources/prioritized_resource.cc b/cc/resources/prioritized_resource.cc
index 78fd90055a9a6e05077a7b752a4ca8c8f35f4404..e8e8157f4e5d0aa9fed6ec590a07a8ed5146b955 100644
--- a/cc/resources/prioritized_resource.cc
+++ b/cc/resources/prioritized_resource.cc
@@ -27,8 +27,10 @@ PrioritizedResource::PrioritizedResource(PrioritizedResourceManager* manager,
manager_(NULL) {
// manager_ is set in RegisterTexture() so validity can be checked.
DCHECK(format || size.IsEmpty());
- if (format)
- bytes_ = Resource::MemorySizeBytes(size, format);
+ if (format) {
+ // TODO(kaanb): check this codepath
enne (OOO) 2013/09/05 02:01:19 Hopefully this codepath is not hit on Android once
kaanb 2013/09/06 02:05:54 We'll probably disable the glow, however with the
+ bytes_ = Resource::MemorySizeBytes(size, format, false);
+ }
if (manager)
manager->RegisterTexture(this);
}
@@ -53,7 +55,7 @@ void PrioritizedResource::SetDimensions(gfx::Size size, GLenum format) {
is_above_priority_cutoff_ = false;
format_ = format;
size_ = size;
- bytes_ = Resource::MemorySizeBytes(size, format);
+ bytes_ = Resource::MemorySizeBytes(size, format, false);
DCHECK(manager_ || !backing_);
if (manager_)
manager_->ReturnBackingTexture(this);
@@ -122,7 +124,7 @@ PrioritizedResource::Backing::Backing(unsigned id,
ResourceProvider* resource_provider,
gfx::Size size,
GLenum format)
- : Resource(id, size, format),
+ : Resource(id, size, format, false),
owner_(NULL),
priority_at_last_priority_update_(PriorityCalculator::LowestPriority()),
was_above_priority_cutoff_at_last_priority_update_(false),

Powered by Google App Engine
This is Rietveld 408576698