OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 void setContentBounds(const WebCore::IntSize& contentBounds) { m_forcedConte
ntBounds = contentBounds; } | 144 void setContentBounds(const WebCore::IntSize& contentBounds) { m_forcedConte
ntBounds = contentBounds; } |
145 virtual WebCore::IntSize contentBounds() const OVERRIDE { return m_forcedCon
tentBounds; } | 145 virtual WebCore::IntSize contentBounds() const OVERRIDE { return m_forcedCon
tentBounds; } |
146 | 146 |
147 protected: | 147 protected: |
148 WebCore::IntSize m_forcedContentBounds; | 148 WebCore::IntSize m_forcedContentBounds; |
149 }; | 149 }; |
150 | 150 |
151 class FakeTextureAllocator : public WebCore::TextureAllocator { | 151 class FakeTextureAllocator : public WebCore::TextureAllocator { |
152 public: | 152 public: |
153 virtual unsigned createTexture(const WebCore::IntSize&, GC3Denum) { return 1
; } | 153 virtual unsigned createTexture(const WebCore::IntSize&, GC3Denum) OVERRIDE {
return 1; } |
154 virtual void deleteTexture(unsigned, const WebCore::IntSize&, GC3Denum) { } | 154 virtual void deleteTexture(unsigned, const WebCore::IntSize&, GC3Denum) OVER
RIDE { } |
| 155 virtual void deleteAllTextures() OVERRIDE { } |
155 }; | 156 }; |
156 | 157 |
157 class FakeTextureCopier : public WebCore::TextureCopier { | 158 class FakeTextureCopier : public WebCore::TextureCopier { |
158 public: | 159 public: |
159 virtual void copyTexture(WebCore::CCGraphicsContext*, unsigned, unsigned, co
nst WebCore::IntSize&) { } | 160 virtual void copyTexture(WebCore::CCGraphicsContext*, unsigned, unsigned, co
nst WebCore::IntSize&) { } |
160 virtual void copyToTexture(WebCore::CCGraphicsContext*, const void*, unsigne
d, const WebCore::IntSize&, GC3Denum) { } | 161 virtual void copyToTexture(WebCore::CCGraphicsContext*, const void*, unsigne
d, const WebCore::IntSize&, GC3Denum) { } |
161 }; | 162 }; |
162 | 163 |
163 class FakeTextureUploader : public WebCore::TextureUploader { | 164 class FakeTextureUploader : public WebCore::TextureUploader { |
164 public: | 165 public: |
165 virtual bool isBusy() { return false; } | 166 virtual bool isBusy() { return false; } |
166 virtual void beginUploads() { } | 167 virtual void beginUploads() { } |
167 virtual void endUploads() { } | 168 virtual void endUploads() { } |
168 virtual void uploadTexture(WebCore::CCGraphicsContext* context, WebCore::Lay
erTextureUpdater::Texture* texture, WebCore::TextureAllocator* allocator, const
WebCore::IntRect sourceRect, const WebCore::IntRect destRect) { texture->updateR
ect(context, allocator, sourceRect, destRect); } | 169 virtual void uploadTexture(WebCore::CCGraphicsContext* context, WebCore::Lay
erTextureUpdater::Texture* texture, WebCore::TextureAllocator* allocator, const
WebCore::IntRect sourceRect, const WebCore::IntRect destRect) { texture->updateR
ect(context, allocator, sourceRect, destRect); } |
169 }; | 170 }; |
170 | 171 |
171 } | 172 } |
172 #endif // CCTiledLayerTestCommon_h | 173 #endif // CCTiledLayerTestCommon_h |
OLD | NEW |