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

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

Issue 1286203002: Defer flushes if kPreferNoIO is specified (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use explicit size in test Created 5 years, 4 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/GrAtlasTextContext.cpp ('k') | src/gpu/GrResourceCache.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 /* 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 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 if (!this->caps()->isConfigTexturable(desc.fConfig)) { 72 if (!this->caps()->isConfigTexturable(desc.fConfig)) {
73 return NULL; 73 return NULL;
74 } 74 }
75 75
76 bool isRT = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag); 76 bool isRT = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag);
77 if (isRT && !this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) { 77 if (isRT && !this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) {
78 return NULL; 78 return NULL;
79 } 79 }
80 80
81 // We currently not support multisampled textures 81 // We currently do not support multisampled textures
82 if (!isRT && desc.fSampleCnt > 0) { 82 if (!isRT && desc.fSampleCnt > 0) {
83 return NULL; 83 return NULL;
84 } 84 }
85 85
86 GrTexture *tex = NULL; 86 GrTexture *tex = NULL;
87 87
88 if (isRT) { 88 if (isRT) {
89 int maxRTSize = this->caps()->maxRenderTargetSize(); 89 int maxRTSize = this->caps()->maxRenderTargetSize();
90 if (desc.fWidth > maxRTSize || desc.fHeight > maxRTSize) { 90 if (desc.fWidth > maxRTSize || desc.fHeight > maxRTSize) {
91 return NULL; 91 return NULL;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 //////////////////////////////////////////////////////////////////////////////// 380 ////////////////////////////////////////////////////////////////////////////////
381 381
382 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) { 382 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) {
383 this->handleDirtyContext(); 383 this->handleDirtyContext();
384 GrVertices::Iterator iter; 384 GrVertices::Iterator iter;
385 const GrNonInstancedVertices* verts = iter.init(vertices); 385 const GrNonInstancedVertices* verts = iter.init(vertices);
386 do { 386 do {
387 this->onDraw(args, *verts); 387 this->onDraw(args, *verts);
388 } while ((verts = iter.next())); 388 } while ((verts = iter.next()));
389 } 389 }
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrResourceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698