Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: WebCore/platform/graphics/chromium/ImageLayerChromium.h

Issue 10633016: Merge r120507 to chromium 1132 branch. (Closed) Base URL: svn://svn.chromium.org/webkit-readonly/branches/chromium/1132/Source/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 31
32 #ifndef ImageLayerChromium_h 32 #ifndef ImageLayerChromium_h
33 #define ImageLayerChromium_h 33 #define ImageLayerChromium_h
34 34
35 #if USE(ACCELERATED_COMPOSITING) 35 #if USE(ACCELERATED_COMPOSITING)
36 36
37 #include "ContentLayerChromium.h" 37 #include "ContentLayerChromium.h"
38 #include "PlatformImage.h" 38 #include "SkBitmap.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class Image;
43 class ImageLayerTextureUpdater; 42 class ImageLayerTextureUpdater;
44 43
45 // A Layer that contains only an Image element. 44 // A Layer that contains only an Image element.
46 class ImageLayerChromium : public TiledLayerChromium { 45 class ImageLayerChromium : public TiledLayerChromium {
47 public: 46 public:
48 static PassRefPtr<ImageLayerChromium> create(); 47 static PassRefPtr<ImageLayerChromium> create();
49 virtual ~ImageLayerChromium(); 48 virtual ~ImageLayerChromium();
50 49
51 virtual bool drawsContent() const OVERRIDE; 50 virtual bool drawsContent() const OVERRIDE;
52 virtual void update(CCTextureUpdater&, const CCOcclusionTracker*) OVERRIDE; 51 virtual void update(CCTextureUpdater&, const CCOcclusionTracker*) OVERRIDE;
53 virtual bool needsContentsScale() const OVERRIDE; 52 virtual bool needsContentsScale() const OVERRIDE;
54 53
55 void setContents(Image* image); 54 void setBitmap(const SkBitmap& image);
56 55
57 private: 56 private:
58 ImageLayerChromium(); 57 ImageLayerChromium();
59 58
60 void setTilingOption(TilingOption); 59 void setTilingOption(TilingOption);
61 60
62 virtual LayerTextureUpdater* textureUpdater() const OVERRIDE; 61 virtual LayerTextureUpdater* textureUpdater() const OVERRIDE;
63 virtual void createTextureUpdaterIfNeeded() OVERRIDE; 62 virtual void createTextureUpdaterIfNeeded() OVERRIDE;
64 virtual IntSize contentBounds() const OVERRIDE; 63 virtual IntSize contentBounds() const OVERRIDE;
65 64
66 NativeImagePtr m_imageForCurrentFrame; 65 SkBitmap m_bitmap;
67 RefPtr<Image> m_contents;
68 66
69 RefPtr<ImageLayerTextureUpdater> m_textureUpdater; 67 RefPtr<ImageLayerTextureUpdater> m_textureUpdater;
70 }; 68 };
71 69
72 } 70 }
73 #endif // USE(ACCELERATED_COMPOSITING) 71 #endif // USE(ACCELERATED_COMPOSITING)
74 72
75 #endif 73 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698