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

Unified Diff: cc/resources/prioritized_resource.h

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deprecate GLenum format throughout cc 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.h
diff --git a/cc/resources/prioritized_resource.h b/cc/resources/prioritized_resource.h
index 07e0787220590a8c5e3232416ddd088403ac4192..66c5df4937a245e3ee0da54e66243bd3f1993dad 100644
--- a/cc/resources/prioritized_resource.h
+++ b/cc/resources/prioritized_resource.h
@@ -12,7 +12,6 @@
#include "cc/resources/priority_calculator.h"
#include "cc/resources/resource.h"
#include "cc/resources/resource_provider.h"
-#include "third_party/khronos/GLES2/gl2.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "ui/gfx/vector2d.h"
@@ -24,13 +23,18 @@ class Proxy;
class CC_EXPORT PrioritizedResource {
public:
- static scoped_ptr<PrioritizedResource>
- Create(PrioritizedResourceManager* manager, gfx::Size size, GLenum format) {
+ static scoped_ptr<PrioritizedResource> Create(
+ PrioritizedResourceManager* manager,
+ gfx::Size size,
+ ResourceProvider::TextureFormat format) {
return make_scoped_ptr(new PrioritizedResource(manager, size, format));
}
static scoped_ptr<PrioritizedResource> Create(
PrioritizedResourceManager* manager) {
- return make_scoped_ptr(new PrioritizedResource(manager, gfx::Size(), 0));
+ return make_scoped_ptr(
+ new PrioritizedResource(manager,
+ gfx::Size(),
+ ResourceProvider::INVALID_FORMAT));
}
~PrioritizedResource();
@@ -38,8 +42,8 @@ class CC_EXPORT PrioritizedResource {
// Setting these to the same value is a no-op.
void SetTextureManager(PrioritizedResourceManager* manager);
PrioritizedResourceManager* resource_manager() { return manager_; }
- void SetDimensions(gfx::Size size, GLenum format);
- GLenum format() const { return format_; }
+ void SetDimensions(gfx::Size size, ResourceProvider::TextureFormat format);
+ ResourceProvider::TextureFormat format() const { return format_; }
gfx::Size size() const { return size_; }
size_t bytes() const { return bytes_; }
bool contents_swizzled() const { return contents_swizzled_; }
@@ -106,7 +110,7 @@ class CC_EXPORT PrioritizedResource {
Backing(unsigned id,
ResourceProvider* resource_provider,
gfx::Size size,
- GLenum format);
+ ResourceProvider::TextureFormat format);
~Backing();
void UpdatePriority();
void UpdateInDrawingImplTree();
@@ -146,7 +150,7 @@ class CC_EXPORT PrioritizedResource {
PrioritizedResource(PrioritizedResourceManager* resource_manager,
gfx::Size size,
- GLenum format);
+ ResourceProvider::TextureFormat format);
bool is_above_priority_cutoff() { return is_above_priority_cutoff_; }
void set_above_priority_cutoff(bool is_above_priority_cutoff) {
@@ -161,7 +165,7 @@ class CC_EXPORT PrioritizedResource {
void Unlink();
gfx::Size size_;
- GLenum format_;
+ ResourceProvider::TextureFormat format_;
size_t bytes_;
bool contents_swizzled_;

Powered by Google App Engine
This is Rietveld 408576698