| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "platform/graphics/ImageObserver.h" | 36 #include "platform/graphics/ImageObserver.h" |
| 37 #include "platform/graphics/ImageOrientation.h" | 37 #include "platform/graphics/ImageOrientation.h" |
| 38 #include "third_party/skia/include/core/SkRefCnt.h" | 38 #include "third_party/skia/include/core/SkRefCnt.h" |
| 39 #include "wtf/Assertions.h" | 39 #include "wtf/Assertions.h" |
| 40 #include "wtf/Noncopyable.h" | 40 #include "wtf/Noncopyable.h" |
| 41 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
| 42 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
| 43 #include "wtf/ThreadSafeRefCounted.h" | 43 #include "wtf/ThreadSafeRefCounted.h" |
| 44 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
| 45 | 45 |
| 46 template <typename T> |
| 47 class sk_sp; |
| 46 class SkCanvas; | 48 class SkCanvas; |
| 49 class SkColorSpace; |
| 47 class SkImage; | 50 class SkImage; |
| 48 class SkMatrix; | 51 class SkMatrix; |
| 49 class SkPaint; | 52 class SkPaint; |
| 50 | 53 |
| 51 namespace blink { | 54 namespace blink { |
| 52 | 55 |
| 53 class FloatPoint; | 56 class FloatPoint; |
| 54 class FloatRect; | 57 class FloatRect; |
| 55 class FloatSize; | 58 class FloatSize; |
| 56 class GraphicsContext; | 59 class GraphicsContext; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 DoNotClampImageToSourceRect | 171 DoNotClampImageToSourceRect |
| 169 }; | 172 }; |
| 170 | 173 |
| 171 virtual void draw(SkCanvas*, | 174 virtual void draw(SkCanvas*, |
| 172 const SkPaint&, | 175 const SkPaint&, |
| 173 const FloatRect& dstRect, | 176 const FloatRect& dstRect, |
| 174 const FloatRect& srcRect, | 177 const FloatRect& srcRect, |
| 175 RespectImageOrientationEnum, | 178 RespectImageOrientationEnum, |
| 176 ImageClampingMode) = 0; | 179 ImageClampingMode) = 0; |
| 177 | 180 |
| 181 virtual void drawInColorSpace(SkCanvas*, |
| 182 const SkPaint&, |
| 183 const FloatRect& dstRect, |
| 184 const FloatRect& srcRect, |
| 185 RespectImageOrientationEnum, |
| 186 ImageClampingMode, |
| 187 sk_sp<SkColorSpace>); |
| 188 |
| 178 virtual bool applyShader(SkPaint&, const SkMatrix& localMatrix); | 189 virtual bool applyShader(SkPaint&, const SkMatrix& localMatrix); |
| 179 | 190 |
| 180 // Compute the tile which contains a given point (assuming a repeating tile | 191 // Compute the tile which contains a given point (assuming a repeating tile |
| 181 // grid). The point and returned value are in destination grid space. | 192 // grid). The point and returned value are in destination grid space. |
| 182 static FloatRect computeTileContaining(const FloatPoint&, | 193 static FloatRect computeTileContaining(const FloatPoint&, |
| 183 const FloatSize& tileSize, | 194 const FloatSize& tileSize, |
| 184 const FloatPoint& tilePhase, | 195 const FloatPoint& tilePhase, |
| 185 const FloatSize& tileSpacing); | 196 const FloatSize& tileSpacing); |
| 186 | 197 |
| 187 // Compute the image subset which gets mapped onto |dest|, when the whole | 198 // Compute the image subset which gets mapped onto |dest|, when the whole |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 bool m_imageObserverDisabled; | 231 bool m_imageObserverDisabled; |
| 221 }; | 232 }; |
| 222 | 233 |
| 223 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 234 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
| 224 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), \ | 235 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), \ |
| 225 image.is##typeName()) | 236 image.is##typeName()) |
| 226 | 237 |
| 227 } // namespace blink | 238 } // namespace blink |
| 228 | 239 |
| 229 #endif | 240 #endif |
| OLD | NEW |