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

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

Issue 2182783004: Add test configs for instanced rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add test configs for instanced rendering Created 4 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/GrGpu.h ('k') | src/gpu/gl/GrGLCaps.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 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 8
9 #include "GrGpu.h" 9 #include "GrGpu.h"
10 10
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 GrBuffer* GrGpu::createBuffer(size_t size, GrBufferType intendedType, 244 GrBuffer* GrGpu::createBuffer(size_t size, GrBufferType intendedType,
245 GrAccessPattern accessPattern, const void* data) { 245 GrAccessPattern accessPattern, const void* data) {
246 this->handleDirtyContext(); 246 this->handleDirtyContext();
247 GrBuffer* buffer = this->onCreateBuffer(size, intendedType, accessPattern, d ata); 247 GrBuffer* buffer = this->onCreateBuffer(size, intendedType, accessPattern, d ata);
248 if (!this->caps()->reuseScratchBuffers()) { 248 if (!this->caps()->reuseScratchBuffers()) {
249 buffer->resourcePriv().removeScratchKey(); 249 buffer->resourcePriv().removeScratchKey();
250 } 250 }
251 return buffer; 251 return buffer;
252 } 252 }
253 253
254 gr_instanced::InstancedRendering* GrGpu::createInstancedRendering() {
255 SkASSERT(GrCaps::InstancedSupport::kNone != this->caps()->instancedSupport() );
256 return this->onCreateInstancedRendering();
257 }
258
254 bool GrGpu::copySurface(GrSurface* dst, 259 bool GrGpu::copySurface(GrSurface* dst,
255 GrSurface* src, 260 GrSurface* src,
256 const SkIRect& srcRect, 261 const SkIRect& srcRect,
257 const SkIPoint& dstPoint) { 262 const SkIPoint& dstPoint) {
258 SkASSERT(dst && src); 263 SkASSERT(dst && src);
259 this->handleDirtyContext(); 264 this->handleDirtyContext();
260 return this->onCopySurface(dst, src, srcRect, dstPoint); 265 return this->onCopySurface(dst, src, srcRect, dstPoint);
261 } 266 }
262 267
263 bool GrGpu::getReadPixelsInfo(GrSurface* srcSurface, int width, int height, size _t rowBytes, 268 bool GrGpu::getReadPixelsInfo(GrSurface* srcSurface, int width, int height, size _t rowBytes,
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // This doesn't have geometric meaning. We just need to define an orderi ng for std::map. 483 // This doesn't have geometric meaning. We just need to define an orderi ng for std::map.
479 if (a[i].x() != b[i].x()) { 484 if (a[i].x() != b[i].x()) {
480 return a[i].x() < b[i].x(); 485 return a[i].x() < b[i].x();
481 } 486 }
482 if (a[i].y() != b[i].y()) { 487 if (a[i].y() != b[i].y()) {
483 return a[i].y() < b[i].y(); 488 return a[i].y() < b[i].y();
484 } 489 }
485 } 490 }
486 return false; // Equal. 491 return false; // Equal.
487 } 492 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698