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

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

Issue 2294533002: Add some copy support for vulkan msaa (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update initDesc name Created 4 years, 3 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 | « no previous file | src/gpu/GrGpu.h » ('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 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 "GrDrawTarget.h" 8 #include "GrDrawTarget.h"
9 9
10 #include "GrAppliedClip.h" 10 #include "GrAppliedClip.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 #ifdef SK_DEBUG 172 #ifdef SK_DEBUG
173 GrCapsDebugf(this->caps(), "Missed an early reject. " 173 GrCapsDebugf(this->caps(), "Missed an early reject. "
174 "Bailing on draw from setupDstReadIfNecessary .\n"); 174 "Bailing on draw from setupDstReadIfNecessary .\n");
175 #endif 175 #endif
176 return false; 176 return false;
177 } 177 }
178 178
179 // MSAA consideration: When there is support for reading MSAA samples in the shader we could 179 // MSAA consideration: When there is support for reading MSAA samples in the shader we could
180 // have per-sample dst values by making the copy multisampled. 180 // have per-sample dst values by making the copy multisampled.
181 GrSurfaceDesc desc; 181 GrSurfaceDesc desc;
182 if (!fGpu->initCopySurfaceDstDesc(rt, &desc)) { 182 if (!fGpu->initDescForDstCopy(rt, &desc)) {
183 desc.fOrigin = kDefault_GrSurfaceOrigin; 183 desc.fOrigin = kDefault_GrSurfaceOrigin;
184 desc.fFlags = kRenderTarget_GrSurfaceFlag; 184 desc.fFlags = kRenderTarget_GrSurfaceFlag;
185 desc.fConfig = rt->config(); 185 desc.fConfig = rt->config();
186 } 186 }
187 187
188 desc.fWidth = copyRect.width(); 188 desc.fWidth = copyRect.width();
189 desc.fHeight = copyRect.height(); 189 desc.fHeight = copyRect.height();
190 190
191 static const uint32_t kFlags = 0; 191 static const uint32_t kFlags = 0;
192 SkAutoTUnref<GrTexture> copy(fResourceProvider->createApproxTexture(desc, kF lags)); 192 SkAutoTUnref<GrTexture> copy(fResourceProvider->createApproxTexture(desc, kF lags));
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 } 616 }
617 } 617 }
618 618
619 /////////////////////////////////////////////////////////////////////////////// 619 ///////////////////////////////////////////////////////////////////////////////
620 620
621 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 621 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
622 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 622 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
623 this->recordBatch(batch, batch->bounds()); 623 this->recordBatch(batch, batch->bounds());
624 batch->unref(); 624 batch->unref();
625 } 625 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698