Bug 155880 - Removed redundant #if conditions in ANGLEWebKitBridge.h
Summary: Removed redundant #if conditions in ANGLEWebKitBridge.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: ANGLE (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-25 05:06 PDT by Konstantin Tokarev
Modified: 2016-03-27 23:47 PDT (History)
8 users (show)

See Also:


Attachments
Patch (1.41 KB, patch)
2016-03-25 05:07 PDT, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (1.69 KB, patch)
2016-03-26 13:13 PDT, Konstantin Tokarev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Tokarev 2016-03-25 05:06:07 PDT
GTK and Efl ports can be built only with cmake, so condition !defined(BUILDING_WITH_CMAKE) implies !PLATFORM(GTK) && !PLATFORM(EFL).
Comment 1 Konstantin Tokarev 2016-03-25 05:07:43 PDT
Created attachment 274899 [details]
Patch
Comment 2 Csaba Osztrogonác 2016-03-25 06:23:39 PDT
Comment on attachment 274899 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=274899&action=review

> Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:49
> -#if !PLATFORM(GTK) && !PLATFORM(EFL) && !PLATFORM(WIN) && !defined(BUILDING_WITH_CMAKE)
> +#if !PLATFORM(WIN) && !defined(BUILDING_WITH_CMAKE)
>  #include "ANGLE/ShaderLang.h"
>  #elif PLATFORM(WIN) && !defined(BUILDING_WITH_CMAKE)
>  #include "GLSLANG/ShaderLang.h"

These conditions are very confusing.
PLATFORM(WIN) && !defined(BUILDING_WITH_CMAKE) is an always false 
condition, Apple Windows port and WinCairo port always use cmake.

Shouldn't we include ANGLE/ShaderLang.h unconditionally?
Comment 3 Konstantin Tokarev 2016-03-25 06:33:03 PDT
(In reply to comment #2)
> These conditions are very confusing.
> PLATFORM(WIN) && !defined(BUILDING_WITH_CMAKE) is an always false 
> condition, Apple Windows port and WinCairo port always use cmake.

Indeed.

> 
> Shouldn't we include ANGLE/ShaderLang.h unconditionally?

Yes.
Comment 4 Alex Christensen 2016-03-25 08:39:34 PDT
Comment on attachment 274899 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=274899&action=review

>> Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:49
>>  #include "GLSLANG/ShaderLang.h"
> 
> These conditions are very confusing.
> PLATFORM(WIN) && !defined(BUILDING_WITH_CMAKE) is an always false 
> condition, Apple Windows port and WinCairo port always use cmake.
> 
> Shouldn't we include ANGLE/ShaderLang.h unconditionally?

This was needed before the switch to CMake on Windows.  It's not needed any more.  Let's clean it up.
Comment 5 Konstantin Tokarev 2016-03-26 13:13:53 PDT
Created attachment 274988 [details]
Patch
Comment 6 WebKit Commit Bot 2016-03-27 23:47:35 PDT
Comment on attachment 274988 [details]
Patch

Clearing flags on attachment: 274988

Committed r198729: <http://trac.webkit.org/changeset/198729>
Comment 7 WebKit Commit Bot 2016-03-27 23:47:39 PDT
All reviewed patches have been landed.  Closing bug.