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

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

Issue 709943003: Address MSAA rendering in layer hoisting (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/core/SkMultiPictureDraw.cpp ('k') | src/gpu/GrLayerHoister.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 2014 Google Inc. 2 * Copyright 2014 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 "GrAtlas.h" 8 #include "GrAtlas.h"
9 #include "GrGpu.h" 9 #include "GrGpu.h"
10 #include "GrLayerCache.h" 10 #include "GrLayerCache.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 return layer; 158 return layer;
159 } 159 }
160 160
161 bool GrLayerCache::tryToAtlas(GrCachedLayer* layer, 161 bool GrLayerCache::tryToAtlas(GrCachedLayer* layer,
162 const GrSurfaceDesc& desc, 162 const GrSurfaceDesc& desc,
163 bool* needsRendering) { 163 bool* needsRendering) {
164 SkDEBUGCODE(GrAutoValidateLayer avl(fAtlas ? fAtlas->getTexture() : NULL, la yer);) 164 SkDEBUGCODE(GrAutoValidateLayer avl(fAtlas ? fAtlas->getTexture() : NULL, la yer);)
165 165
166 SkASSERT(PlausiblyAtlasable(desc.fWidth, desc.fHeight)); 166 SkASSERT(PlausiblyAtlasable(desc.fWidth, desc.fHeight));
167 SkASSERT(0 == desc.fSampleCnt);
167 168
168 if (layer->locked()) { 169 if (layer->locked()) {
169 // This layer is already locked 170 // This layer is already locked
170 SkASSERT(fAtlas); 171 SkASSERT(fAtlas);
171 SkASSERT(layer->isAtlased()); 172 SkASSERT(layer->isAtlased());
172 SkASSERT(layer->rect().width() == desc.fWidth); 173 SkASSERT(layer->rect().width() == desc.fWidth);
173 SkASSERT(layer->rect().height() == desc.fHeight); 174 SkASSERT(layer->rect().height() == desc.fHeight);
174 *needsRendering = false; 175 *needsRendering = false;
175 return true; 176 return true;
176 } 177 }
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 continue; 501 continue;
501 } 502 }
502 503
503 SkString fileName(dirName); 504 SkString fileName(dirName);
504 fileName.appendf("\\%d-%d.png", layer->fKey.pictureID(), layer->fKey.sta rt()); 505 fileName.appendf("\\%d-%d.png", layer->fKey.pictureID(), layer->fKey.sta rt());
505 506
506 layer->texture()->surfacePriv().savePixels(fileName.c_str()); 507 layer->texture()->surfacePriv().savePixels(fileName.c_str());
507 } 508 }
508 } 509 }
509 #endif 510 #endif
OLDNEW
« no previous file with comments | « src/core/SkMultiPictureDraw.cpp ('k') | src/gpu/GrLayerHoister.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698