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

Side by Side Diff: Source/platform/graphics/ImageBufferSurface.h

Issue 1195513002: Use SkImage snapshots for ImageBufferSurface texture access (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: cleanup Created 5 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) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 class PLATFORM_EXPORT ImageBufferSurface { 55 class PLATFORM_EXPORT ImageBufferSurface {
56 WTF_MAKE_NONCOPYABLE(ImageBufferSurface); WTF_MAKE_FAST_ALLOCATED(ImageBuffe rSurface); 56 WTF_MAKE_NONCOPYABLE(ImageBufferSurface); WTF_MAKE_FAST_ALLOCATED(ImageBuffe rSurface);
57 public: 57 public:
58 virtual ~ImageBufferSurface(); 58 virtual ~ImageBufferSurface();
59 59
60 virtual SkCanvas* canvas() const = 0; 60 virtual SkCanvas* canvas() const = 0;
61 virtual const SkBitmap& bitmap(); 61 virtual const SkBitmap& bitmap();
62 virtual void willAccessPixels() { } 62 virtual void willAccessPixels() { }
63 virtual void didDraw(const FloatRect& rect) { } 63 virtual void didDraw(const FloatRect& rect) { }
64 virtual bool isValid() const = 0; 64 virtual bool isValid() const = 0;
65 virtual bool restore() { return false; }; 65 virtual bool restore() { return false; }
66 virtual WebLayer* layer() const { return 0; }; 66 virtual WebLayer* layer() const { return 0; }
67 virtual bool isAccelerated() const { return false; } 67 virtual bool isAccelerated() const { return false; }
68 virtual bool isRecording() const { return false; } 68 virtual bool isRecording() const { return false; }
69 virtual Platform3DObject getBackingTexture() const { return 0; } 69 virtual PassRefPtr<SkImage> getBackingTextureImage() const { return nullptr; }
70 virtual void didModifyBackingTexture() { } 70 virtual void didModifyBackingTexture() { }
71 virtual bool cachedBitmapEnabled() const { return false; } 71 virtual bool cachedBitmapEnabled() const { return false; }
72 virtual bool isExpensiveToPaint() { return false; } 72 virtual bool isExpensiveToPaint() { return false; }
73 virtual const SkBitmap& cachedBitmap() const; 73 virtual const SkBitmap& cachedBitmap() const;
74 virtual void invalidateCachedBitmap() { } 74 virtual void invalidateCachedBitmap() { }
75 virtual void updateCachedBitmapIfNeeded() { } 75 virtual void updateCachedBitmapIfNeeded() { }
76 virtual void setFilterQuality(SkFilterQuality) { } 76 virtual void setFilterQuality(SkFilterQuality) { }
77 virtual void setIsHidden(bool) { } 77 virtual void setIsHidden(bool) { }
78 virtual void setImageBuffer(ImageBuffer*) { } 78 virtual void setImageBuffer(ImageBuffer*) { }
79 virtual PassRefPtr<SkPicture> getPicture(); 79 virtual PassRefPtr<SkPicture> getPicture();
(...skipping 13 matching lines...) Expand all
93 void clear(); 93 void clear();
94 94
95 private: 95 private:
96 OpacityMode m_opacityMode; 96 OpacityMode m_opacityMode;
97 IntSize m_size; 97 IntSize m_size;
98 }; 98 };
99 99
100 } // namespace blink 100 } // namespace blink
101 101
102 #endif 102 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698