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

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

Issue 1216243003: Rename flushForExternalRead->flushForExternalIO and always call in SkSurface::getTextureHandle (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 5 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
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrSurface.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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 srcPI.fColorType = swapRAndB ? toggle_colortype32(dstPI.fColorType) : ds tPI.fColorType; 586 srcPI.fColorType = swapRAndB ? toggle_colortype32(dstPI.fColorType) : ds tPI.fColorType;
587 srcPI.fAlphaType = kPremul_SkAlphaType; 587 srcPI.fAlphaType = kPremul_SkAlphaType;
588 srcPI.fPixels = buffer; 588 srcPI.fPixels = buffer;
589 srcPI.fRowBytes = rowBytes; 589 srcPI.fRowBytes = rowBytes;
590 590
591 return srcPI.convertPixelsTo(&dstPI, width, height); 591 return srcPI.convertPixelsTo(&dstPI, width, height);
592 } 592 }
593 return true; 593 return true;
594 } 594 }
595 595
596 void GrContext::prepareSurfaceForExternalRead(GrSurface* surface) { 596 void GrContext::prepareSurfaceForExternalIO(GrSurface* surface) {
597 RETURN_IF_ABANDONED 597 RETURN_IF_ABANDONED
598 SkASSERT(surface); 598 SkASSERT(surface);
599 ASSERT_OWNED_RESOURCE(surface); 599 ASSERT_OWNED_RESOURCE(surface);
600 if (surface->surfacePriv().hasPendingIO()) { 600 if (surface->surfacePriv().hasPendingIO()) {
601 this->flush(); 601 this->flush();
602 } 602 }
603 GrRenderTarget* rt = surface->asRenderTarget(); 603 GrRenderTarget* rt = surface->asRenderTarget();
604 if (fGpu && rt) { 604 if (fGpu && rt) {
605 fGpu->resolveRenderTarget(rt); 605 fGpu->resolveRenderTarget(rt);
606 } 606 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 ////////////////////////////////////////////////////////////////////////////// 755 //////////////////////////////////////////////////////////////////////////////
756 756
757 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { 757 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) {
758 fGpu->addGpuTraceMarker(marker); 758 fGpu->addGpuTraceMarker(marker);
759 } 759 }
760 760
761 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { 761 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
762 fGpu->removeGpuTraceMarker(marker); 762 fGpu->removeGpuTraceMarker(marker);
763 } 763 }
764 764
OLDNEW
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698