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

Side by Side Diff: src/gpu/GrContext.cpp

Issue 1173203005: Work around for nexus 6 TexSubImage issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 6 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/GrCaps.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContext.h" 9 #include "GrContext.h"
10 10
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 318
319 bool GrContext::writeSurfacePixels(GrSurface* surface, 319 bool GrContext::writeSurfacePixels(GrSurface* surface,
320 int left, int top, int width, int height, 320 int left, int top, int width, int height,
321 GrPixelConfig srcConfig, const void* buffer, size_t rowBytes, 321 GrPixelConfig srcConfig, const void* buffer, size_t rowBytes,
322 uint32_t pixelOpsFlags) { 322 uint32_t pixelOpsFlags) {
323 RETURN_FALSE_IF_ABANDONED 323 RETURN_FALSE_IF_ABANDONED
324 { 324 {
325 GrTexture* texture = NULL; 325 GrTexture* texture = NULL;
326 if (!(kUnpremul_PixelOpsFlag & pixelOpsFlags) && (texture = surface->asT exture()) && 326 if (!(kUnpremul_PixelOpsFlag & pixelOpsFlags) && (texture = surface->asT exture()) &&
327 fGpu->canWriteTexturePixels(texture, srcConfig)) { 327 fGpu->canWriteTexturePixels(texture, srcConfig) &&
328 !fCaps->useDrawInsteadOfPartialTextureWrite()) {
bsalomon 2015/06/18 16:53:52 check that it is partial (note that the rect is kn
328 329
329 if (!(kDontFlush_PixelOpsFlag & pixelOpsFlags) && 330 if (!(kDontFlush_PixelOpsFlag & pixelOpsFlags) &&
330 surface->surfacePriv().hasPendingIO()) { 331 surface->surfacePriv().hasPendingIO()) {
331 this->flush(); 332 this->flush();
332 } 333 }
333 return fGpu->writeTexturePixels(texture, left, top, width, height, 334 return fGpu->writeTexturePixels(texture, left, top, width, height,
334 srcConfig, buffer, rowBytes); 335 srcConfig, buffer, rowBytes);
335 // Don't need to check kFlushWrites_PixelOp here, we just did a dire ct write so the 336 // Don't need to check kFlushWrites_PixelOp here, we just did a dire ct write so the
336 // upload is already flushed. 337 // upload is already flushed.
337 } 338 }
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 ////////////////////////////////////////////////////////////////////////////// 746 //////////////////////////////////////////////////////////////////////////////
746 747
747 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { 748 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) {
748 fGpu->addGpuTraceMarker(marker); 749 fGpu->addGpuTraceMarker(marker);
749 } 750 }
750 751
751 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { 752 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
752 fGpu->removeGpuTraceMarker(marker); 753 fGpu->removeGpuTraceMarker(marker);
753 } 754 }
754 755
OLDNEW
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698