Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 9461004

Browse files
committed
Rename to CompositionSupported and add comment
1 parent 853158e commit 9461004

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

shell/platform/windows/angle_surface_manager.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ bool AngleSurfaceManager::CreateSurface(WindowsRenderTarget* render_target,
210210

211211
std::vector<EGLint> surface_attributes;
212212

213-
if (!DirectCompositionSupported()) {
213+
if (!CompositionSupported()) {
214214
// eglPostSubBufferNV during resizing causes significant artifacts on
215215
// Windows 7, so use fixed size surface instead
216216
// TODO(knopp): This will not be necessary after
@@ -267,7 +267,9 @@ void AngleSurfaceManager::ResizeSurface(WindowsRenderTarget* render_target,
267267
// avoiding the need to destory and recreate the underlying SwapChain.
268268
surface_width_ = width;
269269
surface_height_ = height;
270-
if (!DirectCompositionSupported()) {
270+
if (!CompositionSupported()) {
271+
// Withoutcomposition the surface is created with fixed size.
272+
// See AngleSurfaceManager::CreateSurface for details.
271273
ClearContext();
272274
DestroySurface();
273275
CreateSurface(render_target, width, height);
@@ -317,7 +319,7 @@ EGLBoolean AngleSurfaceManager::SwapBuffers() {
317319
return (eglSwapBuffers(egl_display_, render_surface_));
318320
}
319321

320-
bool AngleSurfaceManager::DirectCompositionSupported() {
322+
bool AngleSurfaceManager::CompositionSupported() {
321323
#ifdef WINUWP
322324
return true;
323325
#else

shell/platform/windows/angle_surface_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class AngleSurfaceManager {
8383

8484
// Returns whether current system supports presenting surface through
8585
// direct composition
86-
static bool DirectCompositionSupported();
86+
static bool CompositionSupported();
8787

8888
// EGL representation of native display.
8989
EGLDisplay egl_display_;

0 commit comments

Comments
 (0)