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

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

Issue 1570173004: This CL adds glTexStorage support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Moving check for TexStorage support inside allocate_and_populate_* calls. Changing the caps to indi… Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "GrTest.h" 8 #include "GrTest.h"
9 9
10 #include "GrBatchAtlas.h" 10 #include "GrBatchAtlas.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 #include "GrGpu.h" 281 #include "GrGpu.h"
282 282
283 class GrPipeline; 283 class GrPipeline;
284 284
285 class MockCaps : public GrCaps { 285 class MockCaps : public GrCaps {
286 public: 286 public:
287 explicit MockCaps(const GrContextOptions& options) : INHERITED(options) {} 287 explicit MockCaps(const GrContextOptions& options) : INHERITED(options) {}
288 bool isConfigTexturable(GrPixelConfig config) const override { return false; } 288 bool isConfigTexturable(GrPixelConfig config) const override { return false; }
289 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override { return false; } 289 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override { return false; }
290 bool isConfigTexSupportEnabled(GrPixelConfig config) const override { return false; }
290 private: 291 private:
291 typedef GrCaps INHERITED; 292 typedef GrCaps INHERITED;
292 }; 293 };
293 294
294 class MockGpu : public GrGpu { 295 class MockGpu : public GrGpu {
295 public: 296 public:
296 MockGpu(GrContext* context, const GrContextOptions& options) : INHERITED(con text) { 297 MockGpu(GrContext* context, const GrContextOptions& options) : INHERITED(con text) {
297 fCaps.reset(new MockCaps(options)); 298 fCaps.reset(new MockCaps(options));
298 } 299 }
299 ~MockGpu() override {} 300 ~MockGpu() override {}
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 SkASSERT(nullptr == fGpu); 417 SkASSERT(nullptr == fGpu);
417 fGpu = new MockGpu(this, options); 418 fGpu = new MockGpu(this, options);
418 SkASSERT(fGpu); 419 SkASSERT(fGpu);
419 this->initCommon(options); 420 this->initCommon(options);
420 421
421 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 422 // We delete these because we want to test the cache starting with zero reso urces. Also, none of
422 // these objects are required for any of tests that use this context. TODO: make stop allocating 423 // these objects are required for any of tests that use this context. TODO: make stop allocating
423 // resources in the buffer pools. 424 // resources in the buffer pools.
424 fDrawingManager->abandon(); 425 fDrawingManager->abandon();
425 } 426 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698