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

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

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const 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/gpu/GrLayerCache.cpp ('k') | src/gpu/GrResourceCache.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 * 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 "GrLayerCache.h" 8 #include "GrLayerCache.h"
9 #include "GrLayerHoister.h" 9 #include "GrLayerHoister.h"
10 #include "GrRecordReplaceDraw.h" 10 #include "GrRecordReplaceDraw.h"
(...skipping 15 matching lines...) Expand all
26 const SkPicture* pict = info.fPicture ? info.fPicture : topLevelPicture; 26 const SkPicture* pict = info.fPicture ? info.fPicture : topLevelPicture;
27 27
28 SkMatrix combined = SkMatrix::Concat(info.fPreMat, info.fLocalMat); 28 SkMatrix combined = SkMatrix::Concat(info.fPreMat, info.fLocalMat);
29 29
30 GrCachedLayer* layer = layerCache->findLayerOrCreate(pict->uniqueID(), 30 GrCachedLayer* layer = layerCache->findLayerOrCreate(pict->uniqueID(),
31 info.fSaveLayerOpID, 31 info.fSaveLayerOpID,
32 info.fRestoreOpID, 32 info.fRestoreOpID,
33 layerRect, 33 layerRect,
34 combined, 34 combined,
35 info.fPaint); 35 info.fPaint);
36 GrTextureDesc desc; 36 GrSurfaceDesc desc;
37 desc.fFlags = kRenderTarget_GrTextureFlagBit; 37 desc.fFlags = kRenderTarget_GrSurfaceFlag;
38 desc.fWidth = layerRect.width(); 38 desc.fWidth = layerRect.width();
39 desc.fHeight = layerRect.height(); 39 desc.fHeight = layerRect.height();
40 desc.fConfig = kSkia8888_GrPixelConfig; 40 desc.fConfig = kSkia8888_GrPixelConfig;
41 // TODO: need to deal with sample count 41 // TODO: need to deal with sample count
42 42
43 bool locked, needsRendering; 43 bool locked, needsRendering;
44 if (attemptToAtlas) { 44 if (attemptToAtlas) {
45 locked = layerCache->tryToAtlas(layer, desc, &needsRendering); 45 locked = layerCache->tryToAtlas(layer, desc, &needsRendering);
46 } else { 46 } else {
47 locked = layerCache->lock(layer, desc, &needsRendering); 47 locked = layerCache->lock(layer, desc, &needsRendering);
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 #if DISABLE_CACHING 317 #if DISABLE_CACHING
318 // This code completely clears out the atlas. It is required when 318 // This code completely clears out the atlas. It is required when
319 // caching is disabled so the atlas doesn't fill up and force more 319 // caching is disabled so the atlas doesn't fill up and force more
320 // free floating layers 320 // free floating layers
321 layerCache->purgeAll(); 321 layerCache->purgeAll();
322 #endif 322 #endif
323 323
324 SkDEBUGCODE(layerCache->validate();) 324 SkDEBUGCODE(layerCache->validate();)
325 } 325 }
326 326
OLDNEW
« no previous file with comments | « src/gpu/GrLayerCache.cpp ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698