Lines Matching defs:plot
203 // zero out the plot
260 AtlasLocator* atlasLocator, Plot* plot) {
261 int pageIdx = plot->pageIndex();
262 this->makeMRU(plot, pageIdx);
267 if (plot->lastUploadToken() < target->tokenTracker()->nextTokenToFlush()) {
269 sk_sp<Plot> plotsp(SkRef(plot));
278 plot->setLastUploadToken(lastUploadToken);
280 atlasLocator->updatePlotLocator(plot->plotLocator());
293 for (Plot* plot = plotIter.get(); plot; plot = plotIter.next()) {
295 plot->bpp());
297 if (plot->addSubImage(width, height, image, atlasLocator)) {
298 return this->updatePlot(target, atlasLocator, plot);
305 // Number of atlas-related flushes beyond which we consider a plot to no longer be in use.
331 // If the above fails, then see if the least recently used plot per page has already been
332 // flushed to the gpu if we're at max page allocation, or if the plot has aged out otherwise.
338 Plot* plot = fPages[pageIdx].fPlotList.tail();
339 SkASSERT(plot);
340 if (plot->lastUseToken() < target->tokenTracker()->nextTokenToFlush()) {
341 this->processEvictionAndResetRects(plot);
343 plot->bpp());
344 SkDEBUGCODE(bool verify = )plot->addSubImage(width, height, image, atlasLocator);
346 if (!this->updatePlot(target, atlasLocator, plot)) {
371 // Try to find a plot that we can perform an inline upload to.
373 Plot* plot = nullptr;
377 plot = currentPlot;
382 // If we can't find a plot that is not used in a draw currently being prepared by an op, then
386 // draw which references the plot's pre-upload content.
387 if (!plot) {
391 this->processEviction(plot->plotLocator());
392 int pageIdx = plot->pageIndex();
393 fPages[pageIdx].fPlotList.remove(plot);
394 sk_sp<Plot>& newPlot = fPages[pageIdx].fPlotArray[plot->plotIndex()];
395 newPlot.reset(plot->clone());
403 // Note that this plot will be uploaded inline with the draws whereas the
432 while (Plot* plot = plotIter.get()) {
433 if (plot->lastUseToken().inInterval(fPrevFlushToken, startTokenForNextFlush)) {
436 } else if (plot->lastUploadToken() != GrDeferredUploadToken::AlreadyFlushedToken()) {
437 this->processEvictionAndResetRects(plot);
472 while (Plot* plot = plotIter.get()) {
474 if (plot->lastUseToken().inInterval(fPrevFlushToken, startTokenForNextFlush)) {
475 plot->resetFlushesSinceLastUsed();
506 while (Plot* plot = plotIter.get()) {
507 // Update number of flushes since plot was last used
511 if (!plot->lastUseToken().inInterval(fPrevFlushToken, startTokenForNextFlush)) {
512 plot->incFlushesSinceLastUsed();
517 SkDebugf("%d ", plot->flushesSinceLastUsed());
522 if (plot->flushesSinceLastUsed() > threshold) {
523 availablePlots.push_back() = plot;
545 while (Plot* plot = plotIter.get()) {
546 // Update number of flushes since plot was last used
547 if (!plot->lastUseToken().inInterval(fPrevFlushToken, startTokenForNextFlush)) {
548 plot->incFlushesSinceLastUsed();
553 SkDebugf("%d ", plot->flushesSinceLastUsed());
556 // If this plot was used recently
557 if (plot->flushesSinceLastUsed() <= threshold) {
559 } else if (plot->lastUseToken() != GrDeferredUploadToken::AlreadyFlushedToken()) {
561 this->processEvictionAndResetRects(plot);
577 while (Plot* plot = plotIter.get()) {
578 // If this plot was used recently
579 if (plot->flushesSinceLastUsed() <= threshold) {
584 this->processEvictionAndResetRects(plot);
750 // allows us to pack 3 in a 512x256 plot, or 9 in a 512x512 plot.