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

Side by Side Diff: src/gpu/vk/GrVkGpu.cpp

Issue 1765633002: Don't allow nullptr in texels array params (unless using a transfer buffer). (Closed) Base URL: https://skia.googlesource.com/skia@usesdk
Patch Set: Upload again in case prev didn't work Created 4 years, 9 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
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrVkGpu.h" 8 #include "GrVkGpu.h"
9 9
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 #endif 535 #endif
536 } else { 536 } else {
537 tex = GrVkTexture::CreateNewTexture(this, desc, lifeCycle, imageDesc); 537 tex = GrVkTexture::CreateNewTexture(this, desc, lifeCycle, imageDesc);
538 } 538 }
539 539
540 if (!tex) { 540 if (!tex) {
541 return nullptr; 541 return nullptr;
542 } 542 }
543 543
544 // TODO: We're ignoring MIP levels here. 544 // TODO: We're ignoring MIP levels here.
545 if (!texels.empty() && texels.begin()->fPixels) { 545 if (!texels.empty()) {
546 SkASSERT(texels.begin()->fPixels);
546 if (!this->uploadTexData(tex, 0, 0, desc.fWidth, desc.fHeight, desc.fCon fig, 547 if (!this->uploadTexData(tex, 0, 0, desc.fWidth, desc.fHeight, desc.fCon fig,
547 texels.begin()->fPixels, texels.begin()->fRowBy tes)) { 548 texels.begin()->fPixels, texels.begin()->fRowBy tes)) {
548 tex->unref(); 549 tex->unref();
549 return nullptr; 550 return nullptr;
550 } 551 }
551 } 552 }
552 553
553 return tex; 554 return tex;
554 } 555 }
555 556
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 int set_a_break_pt_here = 9; 1420 int set_a_break_pt_here = 9;
1420 aglSwapBuffers(aglGetCurrentContext()); 1421 aglSwapBuffers(aglGetCurrentContext());
1421 #elif defined(SK_BUILD_FOR_WIN32) 1422 #elif defined(SK_BUILD_FOR_WIN32)
1422 SwapBuf(); 1423 SwapBuf();
1423 int set_a_break_pt_here = 9; 1424 int set_a_break_pt_here = 9;
1424 SwapBuf(); 1425 SwapBuf();
1425 #endif 1426 #endif
1426 #endif 1427 #endif
1427 } 1428 }
1428 1429
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698