Skip to content

Commit

Permalink
Merge branch 'main' into engine-clang-tidy-check-headers
Browse files Browse the repository at this point in the history
  • Loading branch information
matanlurey authored Sep 19, 2023
2 parents 79feeb7 + d0c1448 commit 5a96a00
Show file tree
Hide file tree
Showing 17 changed files with 387 additions and 187 deletions.
4 changes: 2 additions & 2 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ deps = {
Var('swiftshader_git') + '/SwiftShader.git' + '@' + '5f9ed9b16931c7155171d31f75004f73f0a3abc8',

'src/third_party/angle':
Var('chromium_git') + '/angle/angle.git' + '@' + '48e2c605adcd5bcc1622b18f357c7a73ebfb3543',
Var('chromium_git') + '/angle/angle.git' + '@' + '6a09e41ce6ea8c93524faae1a925eb01562f53b1',

'src/third_party/vulkan_memory_allocator':
Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator' + '@' + '7de5cc00de50e71a3aab22dea52fbb7ff4efceb6',
Expand Down Expand Up @@ -914,7 +914,7 @@ deps = {
'packages': [
{
'package': 'fuchsia/sdk/core/mac-amd64',
'version': '3_Lh8otTpmVuf-Zwb5yQy61cqmV-4g7xjO1wsANaeC0C'
'version': 'qy5FU4y6sx1FscCpd_r8vxXwLApv4irBWyfBT9WF374C'
}
],
'condition': 'host_os == "mac" and not download_fuchsia_sdk',
Expand Down
2 changes: 0 additions & 2 deletions ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,6 @@
../../../third_party/angle/.git
../../../third_party/angle/.gitattributes
../../../third_party/angle/.gitignore
../../../third_party/angle/.gitmodules
../../../third_party/angle/.gn
../../../third_party/angle/.style.yapf
../../../third_party/angle/.vpython
Expand Down Expand Up @@ -1130,7 +1129,6 @@
../../../third_party/angle/src/third_party/ceval/package.json
../../../third_party/angle/src/third_party/libXNVCtrl/README.chromium
../../../third_party/angle/src/third_party/volk
../../../third_party/angle/testing
../../../third_party/angle/third_party
../../../third_party/angle/tools
../../../third_party/angle/util
Expand Down
44 changes: 13 additions & 31 deletions ci/licenses_golden/licenses_third_party
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Signature: d18c418247db94f3fad4810fc4ab16af
Signature: 0e74d276e12eb0bcc1bfbdbbfabc2574

====================================================================================================
LIBRARY: angle
Expand Down Expand Up @@ -42632,8 +42632,12 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/ContextCGL.cpp +
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/ContextCGL.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/DeviceCGL.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/DeviceCGL.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/RendererCGL.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/RendererCGL.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/egl/SyncEGL.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/egl/SyncEGL.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/RendererGLX.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/RendererGLX.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/BufferMtl.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/BufferMtl.mm + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/CompilerMtl.h + ../../../third_party/angle/LICENSE
Expand Down Expand Up @@ -42819,8 +42823,12 @@ FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/ContextCGL.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/ContextCGL.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/DeviceCGL.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/DeviceCGL.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/RendererCGL.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/RendererCGL.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/egl/SyncEGL.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/egl/SyncEGL.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/RendererGLX.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/RendererGLX.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/BufferMtl.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/BufferMtl.mm
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/CompilerMtl.h
Expand Down Expand Up @@ -43218,6 +43226,8 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfac
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/RendererEAGL.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/RendererEAGL.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/PixmapSurfaceGLX.cpp + ../../../third_party/angle/LICENSE
Expand All @@ -43232,7 +43242,6 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/TransformFeedback
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/TransformFeedbackMtl.mm + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/file_hooking/shader_cache_file_hooking.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_autogen.metal + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_ios_autogen.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_macos_autogen.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_src_autogen.h + ../../../third_party/angle/LICENSE
Expand Down Expand Up @@ -43492,6 +43501,8 @@ FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceE
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/RendererEAGL.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/RendererEAGL.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/PixmapSurfaceGLX.cpp
Expand All @@ -43506,7 +43517,6 @@ FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/TransformFeedbackMt
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/TransformFeedbackMtl.mm
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/file_hooking/shader_cache_file_hooking.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_autogen.metal
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_ios_autogen.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_macos_autogen.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_src_autogen.h
Expand Down Expand Up @@ -44468,8 +44478,6 @@ LIBRARY: angle
ORIGIN: ../../../third_party/angle/src/common/FixedQueue.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/common/platform_helpers.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/common/platform_helpers.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/RescopeGlobalVariables.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/RescopeGlobalVariables.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/msl/RewriteInterpolants.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/msl/RewriteInterpolants.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/spirv/EmulateFramebufferFetch.cpp + ../../../third_party/angle/LICENSE
Expand All @@ -44484,13 +44492,6 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/context_private_call_gl.cpp + ..
ORIGIN: ../../../third_party/angle/src/libANGLE/context_private_call_gl_autogen.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/context_private_call_gles.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/context_private_call_gles_autogen.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/ProgramExecutableImpl.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/ProgramExecutableGL.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/ProgramExecutableGL.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/ProgramExecutableMtl.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/blocklayoutMetal.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/blocklayoutMetal.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/mtl_library_cache.h + ../../../third_party/angle/LICENSE
Expand All @@ -44501,17 +44502,12 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/process.cpp + ../
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/process.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/renderermtl_utils.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/renderermtl_utils.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_metallib.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/null/ProgramExecutableNULL.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/null/ProgramExecutableNULL.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/SecondaryCommandPool.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/SecondaryCommandPool.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/ShareGroupVk.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/ShareGroupVk.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/linux/DisplayVkOffscreen.cpp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/linux/DisplayVkOffscreen.h + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/CopyImageToBuffer.comp + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/CopyImageToBuffer.comp.json + ../../../third_party/angle/LICENSE
ORIGIN: ../../../third_party/angle/src/libGLESv2/egl_context_lock_autogen.h + ../../../third_party/angle/LICENSE
Expand All @@ -44520,8 +44516,6 @@ TYPE: LicenseType.bsd
FILE: ../../../third_party/angle/src/common/FixedQueue.h
FILE: ../../../third_party/angle/src/common/platform_helpers.cpp
FILE: ../../../third_party/angle/src/common/platform_helpers.h
FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/RescopeGlobalVariables.cpp
FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/RescopeGlobalVariables.h
FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/msl/RewriteInterpolants.cpp
FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/msl/RewriteInterpolants.h
FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/spirv/EmulateFramebufferFetch.cpp
Expand All @@ -44536,13 +44530,6 @@ FILE: ../../../third_party/angle/src/libANGLE/context_private_call_gl.cpp
FILE: ../../../third_party/angle/src/libANGLE/context_private_call_gl_autogen.h
FILE: ../../../third_party/angle/src/libANGLE/context_private_call_gles.cpp
FILE: ../../../third_party/angle/src/libANGLE/context_private_call_gles_autogen.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/ProgramExecutableImpl.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/ProgramExecutableGL.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/ProgramExecutableGL.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/ProgramExecutableMtl.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/blocklayoutMetal.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/blocklayoutMetal.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/mtl_library_cache.h
Expand All @@ -44553,17 +44540,12 @@ FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/process.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/process.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/renderermtl_utils.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/renderermtl_utils.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_metallib.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/null/ProgramExecutableNULL.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/null/ProgramExecutableNULL.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/SecondaryCommandPool.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/SecondaryCommandPool.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/ShareGroupVk.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/ShareGroupVk.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/linux/DisplayVkOffscreen.cpp
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/linux/DisplayVkOffscreen.h
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/CopyImageToBuffer.comp
FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/CopyImageToBuffer.comp.json
FILE: ../../../third_party/angle/src/libGLESv2/egl_context_lock_autogen.h
Expand Down
17 changes: 11 additions & 6 deletions impeller/typographer/backends/skia/typographer_context_skia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ static ISize OptimumAtlasSizeForFontGlyphPairs(
const std::vector<FontGlyphPair>& pairs,
std::vector<Rect>& glyph_positions,
const std::shared_ptr<GlyphAtlasContext>& atlas_context,
GlyphAtlas::Type type) {
GlyphAtlas::Type type,
const ISize& max_texture_size) {
static constexpr auto kMinAtlasSize = 8u;
static constexpr auto kMinAlphaBitmapSize = 1024u;
static constexpr auto kMaxAtlasSize = 4096u;

TRACE_EVENT0("impeller", __FUNCTION__);

Expand All @@ -147,8 +147,8 @@ static ISize OptimumAtlasSizeForFontGlyphPairs(
Allocation::NextPowerOfTwoSize(current_size.width + 1),
Allocation::NextPowerOfTwoSize(current_size.height + 1));
}
} while (current_size.width <= kMaxAtlasSize &&
current_size.height <= kMaxAtlasSize);
} while (current_size.width <= max_texture_size.width &&
current_size.height <= max_texture_size.height);
return ISize{0, 0};
}

Expand Down Expand Up @@ -366,7 +366,7 @@ std::shared_ptr<GlyphAtlas> TypographerContextSkia::CreateGlyphAtlas(

// ---------------------------------------------------------------------------
// Step 3a: Record the positions in the glyph atlas of the newly added
// glyphs.
// glyphs.
// ---------------------------------------------------------------------------
for (size_t i = 0, count = glyph_positions.size(); i < count; i++) {
last_atlas->AddTypefaceGlyphPosition(new_glyphs[i], glyph_positions[i]);
Expand Down Expand Up @@ -405,7 +405,12 @@ std::shared_ptr<GlyphAtlas> TypographerContextSkia::CreateGlyphAtlas(
}
auto glyph_atlas = std::make_shared<GlyphAtlas>(type);
auto atlas_size = OptimumAtlasSizeForFontGlyphPairs(
font_glyph_pairs, glyph_positions, atlas_context, type);
font_glyph_pairs, //
glyph_positions, //
atlas_context, //
type, //
context.GetResourceAllocator()->GetMaxTextureSizeSupported() //
);

atlas_context->UpdateGlyphAtlas(glyph_atlas, atlas_size);
if (atlas_size.IsEmpty()) {
Expand Down
1 change: 1 addition & 0 deletions lib/web_ui/skwasm/contour_measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "helpers.h"

#include "third_party/skia/include/core/SkContourMeasure.h"
#include "third_party/skia/include/core/SkPath.h"

using namespace Skwasm;

Expand Down
7 changes: 0 additions & 7 deletions shell/platform/windows/angle_surface_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,6 @@ void AngleSurfaceManager::SetVSyncEnabled(bool enabled) {
LogEglError("Unable to update the swap interval");
return;
}

if (eglMakeCurrent(egl_display_, EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT) != EGL_TRUE) {
LogEglError(
"Unable to release the context after updating the swap interval");
return;
}
}

bool AngleSurfaceManager::GetDevice(ID3D11Device** device) {
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/windows/flutter_windows_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class FlutterWindowsEngine {
bool MarkExternalTextureFrameAvailable(int64_t texture_id);

// Posts the given callback onto the raster thread.
virtual bool PostRasterThreadTask(fml::closure callback);
bool PostRasterThreadTask(fml::closure callback);

// Invoke on the embedder's vsync callback to schedule a frame.
void OnVsync(intptr_t baton);
Expand Down
7 changes: 1 addition & 6 deletions shell/platform/windows/flutter_windows_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -669,12 +669,7 @@ void FlutterWindowsView::UpdateSemanticsEnabled(bool enabled) {

void FlutterWindowsView::OnDwmCompositionChanged() {
if (engine_->surface_manager()) {
// Update the surface with the new composition state.
// Switch to the raster thread as this requires making the context current.
auto needs_vsync = binding_handler_->NeedsVSync();
engine_->PostRasterThreadTask([this, needs_vsync]() {
engine_->surface_manager()->SetVSyncEnabled(needs_vsync);
});
engine_->surface_manager()->SetVSyncEnabled(binding_handler_->NeedsVSync());
}
}

Expand Down
Loading

0 comments on commit 5a96a00

Please sign in to comment.