Commit 8ae18f7b authored by Adrienne Walker's avatar Adrienne Walker Committed by Commit Bot

gpu: Don't reset state on more raster decoder commands

In looking at some sampling profiles, it turned out that these commands
(set/reset url and the query commands) were all causing unnecessary
RestoreState in RasterDecoder.  As these don't touch gl state,
whitelist them so that they don't cause extra work.

Bug: 894200
Change-Id: I54837830d7df3b5333b3a3e8e42d9232ef8e8b41
Reviewed-on: https://chromium-review.googlesource.com/c/1297592
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602226}
parent e7f16769
......@@ -282,17 +282,23 @@ bool AllowedBetweenBeginEndRaster(CommandId command) {
// matches GrContext state tracking.
bool PermitsInconsistentContextState(CommandId command) {
switch (command) {
case kBeginQueryEXT:
case kBeginRasterCHROMIUMImmediate:
case kCreateAndConsumeTextureINTERNALImmediate:
case kCreateTransferCacheEntryINTERNAL:
case kDeleteQueriesEXTImmediate:
case kDeleteTexturesImmediate:
case kDeleteTransferCacheEntryINTERNAL:
case kEndQueryEXT:
case kEndRasterCHROMIUM:
case kFinish:
case kFlush:
case kGenQueriesEXTImmediate:
case kGetError:
case kInsertFenceSyncCHROMIUM:
case kRasterCHROMIUM:
case kResetActiveURLCHROMIUM:
case kSetActiveURLCHROMIUM:
case kUnlockTransferCacheEntryINTERNAL:
case kWaitSyncTokenCHROMIUM:
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment