Changeset 132927 in webkit


Ignore:
Timestamp:
Oct 30, 2012, 11:15:05 AM (13 years ago)
Author:
Alexandru Chiculita
Message:

[CSS Shaders] Add the ValidatedCustomFilterOperation class
https://bugs.webkit.org/show_bug.cgi?id=100558

Reviewed by Dean Jackson.

Added the ValidatedCustomFilterOperation class. The file is now almost empty,
but more is going to come in the following patches.

Added the a filter operation type VALIDATED_CUSTOM and updated the compositors to ignore
such operations for now.

No new tests, there is no new functionality yet.

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • Target.pri:
  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::valueForFilter):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::createFilterOperations):

  • platform/graphics/blackberry/LayerWebKitThread.cpp:

(WebCore::LayerWebKitThread::filtersCanBeComposited):

  • platform/graphics/ca/mac/PlatformCALayerMac.mm:

(PlatformCALayer::filtersCanBeComposited):

  • platform/graphics/chromium/GraphicsLayerChromium.cpp:

(WebCore::copyWebCoreFilterOperationsToWebFilterOperations):

  • platform/graphics/filters/FilterOperation.h:
  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::hasCustomFilter):
(WebCore::FilterOperations::getOutsets):

  • platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Added.

(WebCore):
(WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
(WebCore::ValidatedCustomFilterOperation::~ValidatedCustomFilterOperation):
(WebCore::ValidatedCustomFilterOperation::blend):

  • platform/graphics/filters/ValidatedCustomFilterOperation.h: Added.

(WebCore):
(ValidatedCustomFilterOperation):
(WebCore::ValidatedCustomFilterOperation::create):
(WebCore::ValidatedCustomFilterOperation::affectsOpacity):
(WebCore::ValidatedCustomFilterOperation::movesPixels):
(WebCore::ValidatedCustomFilterOperation::blendingNeedsRendererSize):
(WebCore::ValidatedCustomFilterOperation::operator==):

Location:
trunk/Source/WebCore
Files:
2 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r132920 r132927  
    19141914    platform/graphics/filters/CustomFilterOperation.cpp
    19151915    platform/graphics/filters/CustomFilterParameterList.cpp
     1916    platform/graphics/filters/ValidatedCustomFilterOperation.cpp
    19161917    platform/graphics/filters/CustomFilterProgram.cpp
    19171918    platform/graphics/filters/CustomFilterProgramInfo.cpp
  • trunk/Source/WebCore/ChangeLog

    r132925 r132927  
     12012-10-26  Alexandru Chiculita  <achicu@adobe.com>
     2
     3        [CSS Shaders] Add the ValidatedCustomFilterOperation class
     4        https://bugs.webkit.org/show_bug.cgi?id=100558
     5
     6        Reviewed by Dean Jackson.
     7
     8        Added the ValidatedCustomFilterOperation class. The file is now almost empty,
     9        but more is going to come in the following patches.
     10
     11        Added the a filter operation type VALIDATED_CUSTOM and updated the compositors to ignore
     12        such operations for now.
     13       
     14        No new tests, there is no new functionality yet.
     15
     16        * CMakeLists.txt:
     17        * GNUmakefile.list.am:
     18        * Target.pri:
     19        * WebCore.gypi:
     20        * WebCore.vcproj/WebCore.vcproj:
     21        * WebCore.xcodeproj/project.pbxproj:
     22        * css/CSSComputedStyleDeclaration.cpp:
     23        (WebCore::CSSComputedStyleDeclaration::valueForFilter):
     24        * css/StyleResolver.cpp:
     25        (WebCore::StyleResolver::createFilterOperations):
     26        * platform/graphics/blackberry/LayerWebKitThread.cpp:
     27        (WebCore::LayerWebKitThread::filtersCanBeComposited):
     28        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
     29        (PlatformCALayer::filtersCanBeComposited):
     30        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
     31        (WebCore::copyWebCoreFilterOperationsToWebFilterOperations):
     32        * platform/graphics/filters/FilterOperation.h:
     33        * platform/graphics/filters/FilterOperations.cpp:
     34        (WebCore::FilterOperations::hasCustomFilter):
     35        (WebCore::FilterOperations::getOutsets):
     36        * platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Added.
     37        (WebCore):
     38        (WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
     39        (WebCore::ValidatedCustomFilterOperation::~ValidatedCustomFilterOperation):
     40        (WebCore::ValidatedCustomFilterOperation::blend):
     41        * platform/graphics/filters/ValidatedCustomFilterOperation.h: Added.
     42        (WebCore):
     43        (ValidatedCustomFilterOperation):
     44        (WebCore::ValidatedCustomFilterOperation::create):
     45        (WebCore::ValidatedCustomFilterOperation::affectsOpacity):
     46        (WebCore::ValidatedCustomFilterOperation::movesPixels):
     47        (WebCore::ValidatedCustomFilterOperation::blendingNeedsRendererSize):
     48        (WebCore::ValidatedCustomFilterOperation::operator==):
     49
    1502012-10-29  Anders Carlsson  <andersca@apple.com>
    251
  • trunk/Source/WebCore/GNUmakefile.list.am

    r132920 r132927  
    43384338        Source/WebCore/platform/graphics/filters/CustomFilterOperation.cpp \
    43394339        Source/WebCore/platform/graphics/filters/CustomFilterOperation.h \
     4340        Source/WebCore/platform/graphics/filters/ValidatedCustomFilterOperation.cpp \
     4341        Source/WebCore/platform/graphics/filters/ValidatedCustomFilterOperation.h \
    43404342        Source/WebCore/platform/graphics/filters/CustomFilterParameter.h \
    43414343        Source/WebCore/platform/graphics/filters/CustomFilterParameterList.cpp \
  • trunk/Source/WebCore/Target.pri

    r132920 r132927  
    20782078    platform/graphics/filters/CustomFilterCompiledProgram.h \
    20792079    platform/graphics/filters/CustomFilterOperation.h \
     2080    platform/graphics/filters/ValidatedCustomFilterOperation.h \
    20802081    platform/graphics/filters/CustomFilterParameter.h \
    20812082    platform/graphics/filters/CustomFilterParameterList.h \
     
    34973498        platform/graphics/filters/CustomFilterOperation.cpp \
    34983499        platform/graphics/filters/CustomFilterParameterList.cpp \
     3500        platform/graphics/filters/ValidatedCustomFilterOperation.cpp \
    34993501        platform/graphics/filters/CustomFilterProgram.cpp \
    35003502        platform/graphics/filters/CustomFilterProgramInfo.cpp \
  • trunk/Source/WebCore/WebCore.gypi

    r132920 r132927  
    49794979            'platform/graphics/filters/CustomFilterOperation.cpp',
    49804980            'platform/graphics/filters/CustomFilterOperation.h',
     4981            'platform/graphics/filters/ValidatedCustomFilterOperation.cpp',
     4982            'platform/graphics/filters/ValidatedCustomFilterOperation.h',
    49814983            'platform/graphics/filters/CustomFilterParameter.h',
    49824984            'platform/graphics/filters/CustomFilterParameterList.cpp',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r132920 r132927  
    3197831978                                        </File>
    3197931979                                        <File
     31980                                                RelativePath="..\platform\graphics\filters\ValidatedCustomFilterOperation.cpp"
     31981                                                >
     31982                                        </File>
     31983                                        <File
     31984                                                RelativePath="..\platform\graphics\filters\ValidatedCustomFilterOperation.h"
     31985                                                >
     31986                                        </File>
     31987                                        <File
    3198031988                                                RelativePath="..\platform\graphics\filters\CustomFilterParameter.h"
    3198131989                                                >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r132925 r132927  
    15121512                50D10D991545F5760096D288 /* RenderLayerFilterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50D10D971545F5760096D288 /* RenderLayerFilterInfo.cpp */; };
    15131513                50D10D9A1545F5760096D288 /* RenderLayerFilterInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 50D10D981545F5760096D288 /* RenderLayerFilterInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1514                50D32857163B313F0016111E /* ValidatedCustomFilterOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50D32855163B313F0016111E /* ValidatedCustomFilterOperation.cpp */; };
     1515                50D32858163B313F0016111E /* ValidatedCustomFilterOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 50D32856163B313F0016111E /* ValidatedCustomFilterOperation.h */; };
    15141516                50D403C714768C9400D30BB5 /* FECustomFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50D403C514768C9400D30BB5 /* FECustomFilter.cpp */; };
    15151517                50D403C814768C9400D30BB5 /* FECustomFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 50D403C614768C9400D30BB5 /* FECustomFilter.h */; };
     
    87278729                50D10D971545F5760096D288 /* RenderLayerFilterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLayerFilterInfo.cpp; sourceTree = "<group>"; };
    87288730                50D10D981545F5760096D288 /* RenderLayerFilterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderLayerFilterInfo.h; sourceTree = "<group>"; };
     8731                50D32855163B313F0016111E /* ValidatedCustomFilterOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValidatedCustomFilterOperation.cpp; path = filters/ValidatedCustomFilterOperation.cpp; sourceTree = "<group>"; };
     8732                50D32856163B313F0016111E /* ValidatedCustomFilterOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValidatedCustomFilterOperation.h; path = filters/ValidatedCustomFilterOperation.h; sourceTree = "<group>"; };
    87298733                50D403C514768C9400D30BB5 /* FECustomFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FECustomFilter.cpp; path = filters/FECustomFilter.cpp; sourceTree = "<group>"; };
    87308734                50D403C614768C9400D30BB5 /* FECustomFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FECustomFilter.h; path = filters/FECustomFilter.h; sourceTree = "<group>"; };
     
    1826218266                                5093334D163B0E4300099A60 /* CustomFilterParameterList.cpp */,
    1826318267                                5093334E163B0E4300099A60 /* CustomFilterParameterList.h */,
     18268                                50D32855163B313F0016111E /* ValidatedCustomFilterOperation.cpp */,
     18269                                50D32856163B313F0016111E /* ValidatedCustomFilterOperation.h */,
    1826418270                                49ECEB5C1499790D00CDD3A4 /* arm */,
    1826518271                                15B3FC1715FB217800A81BCB /* CustomFilterArrayParameter.h */,
     
    2569725703                                AAC08CF315F941FD00F1E188 /* AccessibilitySVGRoot.h in Headers */,
    2569825704                                50933350163B0E4300099A60 /* CustomFilterParameterList.h in Headers */,
     25705                                50D32858163B313F0016111E /* ValidatedCustomFilterOperation.h in Headers */,
    2569925706                        );
    2570025707                        runOnlyForDeploymentPostprocessing = 0;
     
    2878128788                                5093334F163B0E4300099A60 /* CustomFilterParameterList.cpp in Sources */,
    2878228789                                1AA21250163F0DA80000E63F /* AtomicStringCF.cpp in Sources */,
     28790                                50D32857163B313F0016111E /* ValidatedCustomFilterOperation.cpp in Sources */,
    2878328791                        );
    2878428792                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r132903 r132927  
    905905        }
    906906#if ENABLE(CSS_SHADERS)
     907        case FilterOperation::VALIDATED_CUSTOM:
     908            // ValidatedCustomFilterOperation is not supposed to end up in the RenderStyle.
     909            ASSERT_NOT_REACHED();
     910            break;
    907911        case FilterOperation::CUSTOM: {
    908912            CustomFilterOperation* customOperation = static_cast<CustomFilterOperation*>(filterOperation);
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r132903 r132927  
    49224922
    49234923#if ENABLE(CSS_SHADERS)
     4924        if (operationType == FilterOperation::VALIDATED_CUSTOM) {
     4925            // ValidatedCustomFilterOperation is not supposed to end up in the RenderStyle.
     4926            ASSERT_NOT_REACHED();
     4927            continue;
     4928        }
    49244929        if (operationType == FilterOperation::CUSTOM) {
    49254930            RefPtr<CustomFilterOperation> operation = createCustomFilterOperation(filterValue);
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.cpp

    r130439 r132927  
    418418#if ENABLE(CSS_SHADERS)
    419419        case FilterOperation::CUSTOM:
     420        case FilterOperation::VALIDATED_CUSTOM:
    420421#endif
    421422            return false;
  • trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm

    r131966 r132927  
    851851#if ENABLE(CSS_SHADERS)
    852852        case FilterOperation::CUSTOM:
     853        case FilterOperation::VALIDATED_CUSTOM:
    853854#endif
    854855            return false;
  • trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

    r132223 r132927  
    368368#if ENABLE(CSS_SHADERS)
    369369        case FilterOperation::CUSTOM:
     370        case FilterOperation::VALIDATED_CUSTOM:
    370371            return false; // Not supported.
    371372#endif
  • trunk/Source/WebCore/platform/graphics/filters/FilterOperation.h

    r132528 r132927  
    7070#if ENABLE(CSS_SHADERS)
    7171        CUSTOM,
     72        VALIDATED_CUSTOM,
    7273#endif
    7374        PASSTHROUGH,
  • trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp

    r121513 r132927  
    9292{
    9393    for (size_t i = 0; i < m_operations.size(); ++i) {
    94         if (m_operations.at(i)->getOperationType() == FilterOperation::CUSTOM)
     94        FilterOperation::OperationType type = m_operations.at(i)->getOperationType();
     95        if (type == FilterOperation::CUSTOM || type == FilterOperation::VALIDATED_CUSTOM)
    9596            return true;
    9697    }
     
    147148        }
    148149#if ENABLE(CSS_SHADERS)
    149         case FilterOperation::CUSTOM: {
    150             // Need to include the filter margins here.
     150        case FilterOperation::CUSTOM:
     151        case FilterOperation::VALIDATED_CUSTOM: {
     152            // FIXME: Need to include the filter margins here.
     153            // https://bugs.webkit.org/show_bug.cgi?id=71400
    151154            break;
    152155        }
Note: See TracChangeset for help on using the changeset viewer.