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 28#ifndef CoordinatedGraphicsArgumentCoders_h 29#define CoordinatedGraphicsArgumentCoders_h 30 31#if USE(COORDINATED_GRAPHICS) 32#include "ArgumentCoders.h" 33 34namespace WebCore { 35struct CoordinatedGraphicsLayerState; 36struct CoordinatedGraphicsState; 37class FloatPoint3D; 38class GraphicsLayerAnimation; 39class GraphicsLayerAnimations; 40class SurfaceUpdateInfo; 41struct TileCreationInfo; 42struct TileUpdateInfo; 43class TransformationMatrix; 44class TransformOperations; 45struct Length; 46 47#if ENABLE(CSS_FILTERS) 48class FilterOperations; 49#endif 50 51#if USE(GRAPHICS_SURFACE) 52struct GraphicsSurfaceToken; 53#endif 54} 55 56namespace IPC { 57 58#if ENABLE(CSS_FILTERS) 59template<> struct ArgumentCoder<WebCore::FilterOperations> { 60 static void encode(ArgumentEncoder&, const WebCore::FilterOperations&); 61 static bool decode(ArgumentDecoder&, WebCore::FilterOperations&); 62}; 63#endif 64 65template<> struct ArgumentCoder<WebCore::TransformOperations> { 66 static void encode(ArgumentEncoder&, const WebCore::TransformOperations&); 67 static bool decode(ArgumentDecoder&, WebCore::TransformOperations&); 68}; 69 70template<> struct ArgumentCoder<WebCore::GraphicsLayerAnimations> { 71 static void encode(ArgumentEncoder&, const WebCore::GraphicsLayerAnimations&); 72 static bool decode(ArgumentDecoder&, WebCore::GraphicsLayerAnimations&); 73}; 74 75template<> struct ArgumentCoder<WebCore::GraphicsLayerAnimation> { 76 static void encode(ArgumentEncoder&, const WebCore::GraphicsLayerAnimation&); 77 static bool decode(ArgumentDecoder&, WebCore::GraphicsLayerAnimation&); 78}; 79 80#if USE(GRAPHICS_SURFACE) 81template<> struct ArgumentCoder<WebCore::GraphicsSurfaceToken> { 82 static void encode(ArgumentEncoder&, const WebCore::GraphicsSurfaceToken&); 83 static bool decode(ArgumentDecoder&, WebCore::GraphicsSurfaceToken&); 84}; 85#endif 86 87template<> struct ArgumentCoder<WebCore::SurfaceUpdateInfo> { 88 static void encode(ArgumentEncoder&, const WebCore::SurfaceUpdateInfo&); 89 static bool decode(ArgumentDecoder&, WebCore::SurfaceUpdateInfo&); 90}; 91 92template<> struct ArgumentCoder<WebCore::CoordinatedGraphicsLayerState> { 93 static void encode(ArgumentEncoder&, const WebCore::CoordinatedGraphicsLayerState&); 94 static bool decode(ArgumentDecoder&, WebCore::CoordinatedGraphicsLayerState&); 95}; 96 97template<> struct ArgumentCoder<WebCore::TileUpdateInfo> { 98 static void encode(ArgumentEncoder&, const WebCore::TileUpdateInfo&); 99 static bool decode(ArgumentDecoder&, WebCore::TileUpdateInfo&); 100}; 101 102template<> struct ArgumentCoder<WebCore::TileCreationInfo> { 103 static void encode(ArgumentEncoder&, const WebCore::TileCreationInfo&); 104 static bool decode(ArgumentDecoder&, WebCore::TileCreationInfo&); 105}; 106 107template<> struct ArgumentCoder<WebCore::CoordinatedGraphicsState> { 108 static void encode(ArgumentEncoder&, const WebCore::CoordinatedGraphicsState&); 109 static bool decode(ArgumentDecoder&, WebCore::CoordinatedGraphicsState&); 110}; 111 112} // namespace IPC 113 114#endif // USE(COORDINATED_GRAPHICS) 115 116#endif // CoordinatedGraphicsArgumentCoders_h 117