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

Side by Side Diff: gpu/command_buffer/service/mailbox_manager_sync.cc

Issue 2208733002: Command buffer: clear rect for a specific layer/level of the uncleared texture for CopyTexSubImage3D (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not assign a default value 0 to layer, UpdateMipCleared for all layers for 3D texture Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "gpu/command_buffer/service/mailbox_manager_sync.h" 5 #include "gpu/command_buffer/service/mailbox_manager_sync.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <queue> 10 #include <queue>
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 271
272 void MailboxManagerSync::UpdateDefinitionLocked( 272 void MailboxManagerSync::UpdateDefinitionLocked(
273 Texture* texture, 273 Texture* texture,
274 TextureGroupRef* group_ref) { 274 TextureGroupRef* group_ref) {
275 g_lock.Get().AssertAcquired(); 275 g_lock.Get().AssertAcquired();
276 276
277 if (SkipTextureWorkarounds(texture)) 277 if (SkipTextureWorkarounds(texture))
278 return; 278 return;
279 279
280 gl::GLImage* image = texture->GetLevelImage(texture->target(), 0); 280 gl::GLImage* image = texture->GetLevelImage(texture->target(), 0, 0);
281 TextureGroup* group = group_ref->group.get(); 281 TextureGroup* group = group_ref->group.get();
282 const TextureDefinition& definition = group->GetDefinition(); 282 const TextureDefinition& definition = group->GetDefinition();
283 scoped_refptr<NativeImageBuffer> image_buffer = definition.image(); 283 scoped_refptr<NativeImageBuffer> image_buffer = definition.image();
284 284
285 // Make sure we don't clobber with an older version 285 // Make sure we don't clobber with an older version
286 if (!definition.IsOlderThan(group_ref->version)) 286 if (!definition.IsOlderThan(group_ref->version))
287 return; 287 return;
288 288
289 // Also don't push redundant updates. Note that it would break the 289 // Also don't push redundant updates. Note that it would break the
290 // versioning. 290 // versioning.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 332
333 if (!needs_update.empty()) { 333 if (!needs_update.empty()) {
334 for (const TextureUpdatePair& pair : needs_update) { 334 for (const TextureUpdatePair& pair : needs_update) {
335 pair.second.UpdateTexture(pair.first); 335 pair.second.UpdateTexture(pair.first);
336 } 336 }
337 } 337 }
338 } 338 }
339 339
340 } // namespace gles2 340 } // namespace gles2
341 } // namespace gpu 341 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698