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

Unified Diff: cc/resources/resource_provider.cc

Issue 13870013: Pass texture target to CreateResourceFromExternalTexture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GL_TEXTURE_RECTANGLE_ARB in io surface layer Created 7 years, 8 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
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index f93bd36a5e6a79ff849a13c766ebdab6b7535a97..7c55a3c52f3fcdca765f14714facf03ea878b535 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -235,21 +235,23 @@ ResourceProvider::ResourceId ResourceProvider::CreateBitmap(gfx::Size size) {
return id;
}
-ResourceProvider::ResourceId ResourceProvider::
- CreateResourceFromExternalTexture(unsigned texture_id) {
+ResourceProvider::ResourceId
+ResourceProvider::CreateResourceFromExternalTexture(
+ unsigned texture_target,
+ unsigned texture_id) {
DCHECK(thread_checker_.CalledOnValidThread());
WebGraphicsContext3D* context3d = output_surface_->context3d();
DCHECK(context3d);
- GLC(context3d, context3d->bindTexture(GL_TEXTURE_2D, texture_id));
+ GLC(context3d, context3d->bindTexture(texture_target, texture_id));
GLC(context3d, context3d->texParameteri(
- GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
+ texture_target, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
GLC(context3d, context3d->texParameteri(
- GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
+ texture_target, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
GLC(context3d, context3d->texParameteri(
- GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
+ texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
GLC(context3d, context3d->texParameteri(
- GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
+ texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
ResourceId id = next_id_++;
Resource resource(texture_id, gfx::Size(), 0, GL_LINEAR);
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698