Bug 1600533 - Rename WaitForPreviousPresentQuery() r=gw

Differential Revision: https://phabricator.services.mozilla.com/D55403

--HG--
extra : moz-landing-system : lando
This commit is contained in:
sotaro 2019-12-02 10:41:57 +00:00
Родитель d2bcfce6f8
Коммит 9171fb9fcf
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -415,7 +415,7 @@ bool RenderCompositorANGLE::BeginFrame() {
RenderedFrameId RenderCompositorANGLE::EndFrame(
const FfiVec<DeviceIntRect>& aDirtyRects) {
RenderedFrameId frameId = GetNextRenderFrameId();
InsertPresentWaitQuery(frameId);
InsertGraphicsCommandsFinishedWaitQuery(frameId);
if (!UseCompositor()) {
if (mWidget->AsWindows()->HasFxrOutputHandler()) {
@ -493,7 +493,7 @@ bool RenderCompositorANGLE::WaitForGPU() {
// Wait for query #2.
//
// This ensures we're done reading textures before swapping buffers.
return WaitForPreviousPresentQuery();
return WaitForPreviousGraphicsCommandsFinishedQuery();
}
bool RenderCompositorANGLE::ResizeBufferIfNeeded() {
@ -654,7 +654,8 @@ RefPtr<ID3D11Query> RenderCompositorANGLE::GetD3D11Query() {
return query;
}
void RenderCompositorANGLE::InsertPresentWaitQuery(RenderedFrameId aFrameId) {
void RenderCompositorANGLE::InsertGraphicsCommandsFinishedWaitQuery(
RenderedFrameId aFrameId) {
RefPtr<ID3D11Query> query;
query = GetD3D11Query();
if (!query) {
@ -665,7 +666,7 @@ void RenderCompositorANGLE::InsertPresentWaitQuery(RenderedFrameId aFrameId) {
mWaitForPresentQueries.emplace(aFrameId, query);
}
bool RenderCompositorANGLE::WaitForPreviousPresentQuery() {
bool RenderCompositorANGLE::WaitForPreviousGraphicsCommandsFinishedQuery() {
size_t waitLatency = mUseTripleBuffering ? 3 : 2;
while (mWaitForPresentQueries.size() >= waitLatency) {

Просмотреть файл

@ -90,8 +90,9 @@ class RenderCompositorANGLE : public RenderCompositor {
protected:
bool UseCompositor();
void InitializeUsePartialPresent();
void InsertPresentWaitQuery(RenderedFrameId aRenderedFrameId);
bool WaitForPreviousPresentQuery();
void InsertGraphicsCommandsFinishedWaitQuery(
RenderedFrameId aRenderedFrameId);
bool WaitForPreviousGraphicsCommandsFinishedQuery();
bool ResizeBufferIfNeeded();
bool CreateEGLSurface();
void DestroyEGLSurface();