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

Side by Side Diff: tests/RecordReplaceDrawTest.cpp

Issue 864383003: Remove createUncachedTexture function, attempt to recycle scratch in createTexture. (Closed) Base URL: https://skia.googlesource.com/skia.git@continue
Patch Set: Comments, fixes Created 5 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 | « tests/ReadWriteAlphaTest.cpp ('k') | tests/WritePixelsTest.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 #if SK_SUPPORT_GPU 8 #if SK_SUPPORT_GPU
9 9
10 #include "Test.h" 10 #include "Test.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 SkIRect::MakeWH(kWidth, kHeight), 117 SkIRect::MakeWH(kWidth, kHeight),
118 SkMatrix::I(), key, 1, &paint); 118 SkMatrix::I(), key, 1, &paint);
119 119
120 GrSurfaceDesc desc; 120 GrSurfaceDesc desc;
121 desc.fConfig = kSkia8888_GrPixelConfig; 121 desc.fConfig = kSkia8888_GrPixelConfig;
122 desc.fFlags = kRenderTarget_GrSurfaceFlag; 122 desc.fFlags = kRenderTarget_GrSurfaceFlag;
123 desc.fWidth = kWidth; 123 desc.fWidth = kWidth;
124 desc.fHeight = kHeight; 124 desc.fHeight = kHeight;
125 desc.fSampleCnt = 0; 125 desc.fSampleCnt = 0;
126 126
127 SkAutoTUnref<GrTexture> texture(context->createUncachedTexture(desc, NULL, 0 )); 127 SkAutoTUnref<GrTexture> texture(context->createTexture(desc, false, NULL, 0) );
128 layer->setTexture(texture, SkIRect::MakeWH(kWidth, kHeight)); 128 layer->setTexture(texture, SkIRect::MakeWH(kWidth, kHeight));
129 129
130 SkAutoTUnref<SkBBoxHierarchy> bbh; 130 SkAutoTUnref<SkBBoxHierarchy> bbh;
131 131
132 SkRecord rerecord; 132 SkRecord rerecord;
133 SkRecorder canvas(&rerecord, kWidth, kHeight); 133 SkRecorder canvas(&rerecord, kWidth, kHeight);
134 GrRecordReplaceDraw(pic, &canvas, layerCache, SkMatrix::I(), NULL/*callback* /); 134 GrRecordReplaceDraw(pic, &canvas, layerCache, SkMatrix::I(), NULL/*callback* /);
135 135
136 int recount = rerecord.count(); 136 int recount = rerecord.count();
137 REPORTER_ASSERT(r, 2 == recount || 4 == recount); 137 REPORTER_ASSERT(r, 2 == recount || 4 == recount);
(...skipping 20 matching lines...) Expand all
158 if (NULL == context) { 158 if (NULL == context) {
159 continue; 159 continue;
160 } 160 }
161 161
162 test_replacements(r, context, true); 162 test_replacements(r, context, true);
163 test_replacements(r, context, false); 163 test_replacements(r, context, false);
164 } 164 }
165 } 165 }
166 166
167 #endif 167 #endif
OLDNEW
« no previous file with comments | « tests/ReadWriteAlphaTest.cpp ('k') | tests/WritePixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698