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

Side by Side Diff: cc/layers/io_surface_layer_impl.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/io_surface_layer_impl.h" 5 #include "cc/layers/io_surface_layer_impl.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "cc/layers/quad_sink.h" 8 #include "cc/layers/quad_sink.h"
9 #include "cc/output/gl_renderer.h" // For the GLC() macro. 9 #include "cc/output/gl_renderer.h" // For the GLC() macro.
10 #include "cc/output/output_surface.h" 10 #include "cc/output/output_surface.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (!context3d) { 70 if (!context3d) {
71 // FIXME: Implement this path for software compositing. 71 // FIXME: Implement this path for software compositing.
72 return; 72 return;
73 } 73 }
74 74
75 // FIXME: Do this in a way that we can track memory usage. 75 // FIXME: Do this in a way that we can track memory usage.
76 if (!io_surface_texture_id_) { 76 if (!io_surface_texture_id_) {
77 io_surface_texture_id_ = context3d->createTexture(); 77 io_surface_texture_id_ = context3d->createTexture();
78 io_surface_resource_id_ = 78 io_surface_resource_id_ =
79 resource_provider->CreateResourceFromExternalTexture( 79 resource_provider->CreateResourceFromExternalTexture(
80 GL_TEXTURE_RECTANGLE_ARB,
80 io_surface_texture_id_); 81 io_surface_texture_id_);
81 } 82 }
82 83
83 GLC(context3d, context3d->activeTexture(GL_TEXTURE0)); 84 GLC(context3d, context3d->activeTexture(GL_TEXTURE0));
84 GLC(context3d, 85 GLC(context3d,
85 context3d->bindTexture(GL_TEXTURE_RECTANGLE_ARB, 86 context3d->bindTexture(GL_TEXTURE_RECTANGLE_ARB,
86 io_surface_texture_id_)); 87 io_surface_texture_id_));
87 GLC(context3d, 88 GLC(context3d,
88 context3d->texParameteri( 89 context3d->texParameteri(
89 GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR)); 90 GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 155
155 io_surface_id_ = io_surface_id; 156 io_surface_id_ = io_surface_id;
156 io_surface_size_ = size; 157 io_surface_size_ = size;
157 } 158 }
158 159
159 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { 160 const char* IOSurfaceLayerImpl::LayerTypeAsString() const {
160 return "IOSurfaceLayer"; 161 return "IOSurfaceLayer";
161 } 162 }
162 163
163 } // namespace cc 164 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698