CoordinatedGraphicsArgumentCoders.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
  3. * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
  4. * Copyright (C) 2012 Company 100, Inc.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. *
  15. * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
  16. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  17. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  18. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
  19. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  20. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  21. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  22. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  23. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  24. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  25. * THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. #ifndef CoordinatedGraphicsArgumentCoders_h
  28. #define CoordinatedGraphicsArgumentCoders_h
  29. #if USE(COORDINATED_GRAPHICS)
  30. #include "ArgumentCoders.h"
  31. namespace WebCore {
  32. struct CoordinatedGraphicsLayerState;
  33. struct CoordinatedGraphicsState;
  34. class FloatPoint3D;
  35. class GraphicsLayerAnimation;
  36. class GraphicsLayerAnimations;
  37. class SurfaceUpdateInfo;
  38. struct TileCreationInfo;
  39. struct TileUpdateInfo;
  40. class TransformationMatrix;
  41. class TransformOperations;
  42. struct Length;
  43. #if ENABLE(CSS_FILTERS)
  44. class FilterOperations;
  45. #endif
  46. #if ENABLE(CSS_SHADERS)
  47. class CustomFilterProgramInfo;
  48. #endif
  49. #if USE(GRAPHICS_SURFACE)
  50. struct GraphicsSurfaceToken;
  51. #endif
  52. }
  53. namespace CoreIPC {
  54. template<> struct ArgumentCoder<WebCore::FloatPoint3D> {
  55. static void encode(ArgumentEncoder&, const WebCore::FloatPoint3D&);
  56. static bool decode(ArgumentDecoder&, WebCore::FloatPoint3D&);
  57. };
  58. template<> struct ArgumentCoder<WebCore::Length> {
  59. static void encode(ArgumentEncoder&, const WebCore::Length&);
  60. static bool decode(ArgumentDecoder&, WebCore::Length&);
  61. };
  62. template<> struct ArgumentCoder<WebCore::TransformationMatrix> {
  63. static void encode(ArgumentEncoder&, const WebCore::TransformationMatrix&);
  64. static bool decode(ArgumentDecoder&, WebCore::TransformationMatrix&);
  65. };
  66. #if ENABLE(CSS_FILTERS)
  67. template<> struct ArgumentCoder<WebCore::FilterOperations> {
  68. static void encode(ArgumentEncoder&, const WebCore::FilterOperations&);
  69. static bool decode(ArgumentDecoder&, WebCore::FilterOperations&);
  70. };
  71. #endif
  72. #if ENABLE(CSS_SHADERS)
  73. template<> struct ArgumentCoder<WebCore::CustomFilterProgramInfo> {
  74. static void encode(ArgumentEncoder&, const WebCore::CustomFilterProgramInfo&);
  75. static bool decode(ArgumentDecoder&, WebCore::CustomFilterProgramInfo&);
  76. };
  77. #endif
  78. template<> struct ArgumentCoder<WebCore::TransformOperations> {
  79. static void encode(ArgumentEncoder&, const WebCore::TransformOperations&);
  80. static bool decode(ArgumentDecoder&, WebCore::TransformOperations&);
  81. };
  82. template<> struct ArgumentCoder<WebCore::GraphicsLayerAnimations> {
  83. static void encode(ArgumentEncoder&, const WebCore::GraphicsLayerAnimations&);
  84. static bool decode(ArgumentDecoder&, WebCore::GraphicsLayerAnimations&);
  85. };
  86. template<> struct ArgumentCoder<WebCore::GraphicsLayerAnimation> {
  87. static void encode(ArgumentEncoder&, const WebCore::GraphicsLayerAnimation&);
  88. static bool decode(ArgumentDecoder&, WebCore::GraphicsLayerAnimation&);
  89. };
  90. #if USE(GRAPHICS_SURFACE)
  91. template<> struct ArgumentCoder<WebCore::GraphicsSurfaceToken> {
  92. static void encode(ArgumentEncoder&, const WebCore::GraphicsSurfaceToken&);
  93. static bool decode(ArgumentDecoder&, WebCore::GraphicsSurfaceToken&);
  94. };
  95. #endif
  96. template<> struct ArgumentCoder<WebCore::SurfaceUpdateInfo> {
  97. static void encode(ArgumentEncoder&, const WebCore::SurfaceUpdateInfo&);
  98. static bool decode(ArgumentDecoder&, WebCore::SurfaceUpdateInfo&);
  99. };
  100. template<> struct ArgumentCoder<WebCore::CoordinatedGraphicsLayerState> {
  101. static void encode(ArgumentEncoder&, const WebCore::CoordinatedGraphicsLayerState&);
  102. static bool decode(ArgumentDecoder&, WebCore::CoordinatedGraphicsLayerState&);
  103. };
  104. template<> struct ArgumentCoder<WebCore::TileUpdateInfo> {
  105. static void encode(ArgumentEncoder&, const WebCore::TileUpdateInfo&);
  106. static bool decode(ArgumentDecoder&, WebCore::TileUpdateInfo&);
  107. };
  108. template<> struct ArgumentCoder<WebCore::TileCreationInfo> {
  109. static void encode(ArgumentEncoder&, const WebCore::TileCreationInfo&);
  110. static bool decode(ArgumentDecoder&, WebCore::TileCreationInfo&);
  111. };
  112. template<> struct ArgumentCoder<WebCore::CoordinatedGraphicsState> {
  113. static void encode(ArgumentEncoder&, const WebCore::CoordinatedGraphicsState&);
  114. static bool decode(ArgumentDecoder&, WebCore::CoordinatedGraphicsState&);
  115. };
  116. } // namespace CoreIPC
  117. #endif // USE(COORDINATED_GRAPHICS)
  118. #endif // CoordinatedGraphicsArgumentCoders_h