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

Side by Side Diff: cc/resources/video_resource_updater.cc

Issue 371463009: Making use of bindless variants mailbox produce/consume on remainders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/resources/video_resource_updater.h" 5 #include "cc/resources/video_resource_updater.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/output/gl_renderer.h" 8 #include "cc/output/gl_renderer.h"
9 #include "cc/resources/resource_provider.h" 9 #include "cc/resources/resource_provider.h"
10 #include "gpu/GLES2/gl2extchromium.h" 10 #include "gpu/GLES2/gl2extchromium.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 DCHECK(mailbox.IsZero()); 181 DCHECK(mailbox.IsZero());
182 182
183 if (!software_compositor) { 183 if (!software_compositor) {
184 DCHECK(context_provider_); 184 DCHECK(context_provider_);
185 185
186 gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL(); 186 gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
187 187
188 GLC(gl, gl->GenMailboxCHROMIUM(mailbox.name)); 188 GLC(gl, gl->GenMailboxCHROMIUM(mailbox.name));
189 ResourceProvider::ScopedWriteLockGL lock(resource_provider_, 189 ResourceProvider::ScopedWriteLockGL lock(resource_provider_,
190 resource_id); 190 resource_id);
191 GLC(gl, gl->BindTexture(GL_TEXTURE_2D, lock.texture_id())); 191 GLC(gl,
192 GLC(gl, gl->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name)); 192 gl->ProduceTextureDirectCHROMIUM(
193 GLC(gl, gl->BindTexture(GL_TEXTURE_2D, 0)); 193 lock.texture_id(), GL_TEXTURE_2D, mailbox.name));
194 } 194 }
195 195
196 if (resource_id) 196 if (resource_id)
197 all_resources_.push_back(resource_id); 197 all_resources_.push_back(resource_id);
198 } 198 }
199 199
200 if (resource_id == 0) { 200 if (resource_id == 0) {
201 allocation_success = false; 201 allocation_success = false;
202 break; 202 break;
203 } 203 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 358 }
359 359
360 PlaneResource recycled_resource(data.resource_id, 360 PlaneResource recycled_resource(data.resource_id,
361 data.resource_size, 361 data.resource_size,
362 data.resource_format, 362 data.resource_format,
363 data.mailbox); 363 data.mailbox);
364 updater->recycled_resources_.push_back(recycled_resource); 364 updater->recycled_resources_.push_back(recycled_resource);
365 } 365 }
366 366
367 } // namespace cc 367 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698