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

Unified Diff: cc/resources/resource_provider.h

Issue 83883002: cc: Allow TEXTURE_RECTANGLE_ARB to be used for tile textures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index fccb70ca41cfd7d67afac8ed607517c62e8985da..6cd4270fe0840e3cead3f17fdde266255dbc8fa8 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -101,12 +101,14 @@ class CC_EXPORT ResourceProvider {
// Creates a resource which is tagged as being managed for GPU memory
// accounting purposes.
ResourceId CreateManagedResource(gfx::Size size,
+ GLenum target,
GLint wrap_mode,
TextureUsageHint hint,
ResourceFormat format);
// You can also explicitly create a specific resource type.
ResourceId CreateGLTexture(gfx::Size size,
+ GLenum target,
GLenum texture_pool,
GLint wrap_mode,
TextureUsageHint hint,
@@ -221,18 +223,18 @@ class CC_EXPORT ResourceProvider {
public:
ScopedSamplerGL(ResourceProvider* resource_provider,
ResourceProvider::ResourceId resource_id,
- GLenum target,
GLenum filter);
ScopedSamplerGL(ResourceProvider* resource_provider,
ResourceProvider::ResourceId resource_id,
- GLenum target,
GLenum unit,
GLenum filter);
virtual ~ScopedSamplerGL();
+ GLenum target() const { return target_; }
+
private:
- GLenum target_;
GLenum unit_;
kaanb 2013/11/23 02:02:20 Does the order of the fields need to change?
reveman 2013/11/23 10:29:12 Makes initialization a bit cleaner as I can use un
+ GLenum target_;
DISALLOW_COPY_AND_ASSIGN(ScopedSamplerGL);
};
@@ -465,12 +467,11 @@ class CC_EXPORT ResourceProvider {
void LazyAllocate(Resource* resource);
// Binds the given GL resource to a texture target for sampling using the
- // specified filter for both minification and magnification. The resource
- // must be locked for reading.
- void BindForSampling(ResourceProvider::ResourceId resource_id,
- GLenum target,
- GLenum unit,
- GLenum filter);
+ // specified filter for both minification and magnification. Returns the
+ // texture target used. The resource must be locked for reading.
+ GLenum BindForSampling(ResourceProvider::ResourceId resource_id,
+ GLenum unit,
+ GLenum filter);
// Returns NULL if the output_surface_ does not have a ContextProvider.
blink::WebGraphicsContext3D* Context3d() const;

Powered by Google App Engine
This is Rietveld 408576698