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

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

Issue 1734043002: Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/GrGpuResourcePriv.h ('k') | src/gpu/GrLayerCache.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 2010 Google Inc. 3 * Copyright 2010 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 "GrGpuResourcePriv.h" 9 #include "GrGpuResourcePriv.h"
10 #include "GrLayerAtlas.h" 10 #include "GrLayerAtlas.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void GrLayerAtlas::createBackingTexture() { 60 void GrLayerAtlas::createBackingTexture() {
61 SkASSERT(!fTexture); 61 SkASSERT(!fTexture);
62 62
63 GrSurfaceDesc desc; 63 GrSurfaceDesc desc;
64 desc.fFlags = fFlags; 64 desc.fFlags = fFlags;
65 desc.fWidth = fBackingTextureSize.width(); 65 desc.fWidth = fBackingTextureSize.width();
66 desc.fHeight = fBackingTextureSize.height(); 66 desc.fHeight = fBackingTextureSize.height();
67 desc.fConfig = fPixelConfig; 67 desc.fConfig = fPixelConfig;
68 68
69 fTexture.reset(fTexProvider->createTexture(desc, SkBudgeted::kYes, nullptr, 0)); 69 fTexture.reset(fTexProvider->createTexture(desc, true, nullptr, 0));
70 70
71 fTexture->resourcePriv().setUniqueKey(get_layer_atlas_key()); 71 fTexture->resourcePriv().setUniqueKey(get_layer_atlas_key());
72 } 72 }
73 73
74 GrLayerAtlas::GrLayerAtlas(GrTextureProvider* texProvider, GrPixelConfig config, 74 GrLayerAtlas::GrLayerAtlas(GrTextureProvider* texProvider, GrPixelConfig config,
75 GrSurfaceFlags flags, 75 GrSurfaceFlags flags,
76 const SkISize& backingTextureSize, 76 const SkISize& backingTextureSize,
77 int numPlotsX, int numPlotsY) { 77 int numPlotsX, int numPlotsY) {
78 fTexProvider = texProvider; 78 fTexProvider = texProvider;
79 fPixelConfig = config; 79 fPixelConfig = config;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 usage->appendPlot(plot); 161 usage->appendPlot(plot);
162 return plot; 162 return plot;
163 } 163 }
164 plotIter.next(); 164 plotIter.next();
165 } 165 }
166 166
167 // If the above fails, then the current plot list has no room 167 // If the above fails, then the current plot list has no room
168 return nullptr; 168 return nullptr;
169 } 169 }
170 170
OLDNEW
« no previous file with comments | « src/gpu/GrGpuResourcePriv.h ('k') | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698