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

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

Issue 562583002: Implement image-rendering:pixelated for accelerated 2D canvases. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual void willAccessPixels() { } 63 virtual void willAccessPixels() { }
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 Platform3DObject getBackingTexture() const { return 0; } 68 virtual Platform3DObject getBackingTexture() const { return 0; }
69 virtual bool cachedBitmapEnabled() const { return false; } 69 virtual bool cachedBitmapEnabled() const { return false; }
70 virtual const SkBitmap& cachedBitmap() const; 70 virtual const SkBitmap& cachedBitmap() const;
71 virtual void invalidateCachedBitmap() { } 71 virtual void invalidateCachedBitmap() { }
72 virtual void updateCachedBitmapIfNeeded() { } 72 virtual void updateCachedBitmapIfNeeded() { }
73 virtual void setNearestNeighbor(bool) { }
73 virtual void setIsHidden(bool) { } 74 virtual void setIsHidden(bool) { }
74 virtual void setImageBuffer(ImageBuffer*) { } 75 virtual void setImageBuffer(ImageBuffer*) { }
75 virtual PassRefPtr<SkPicture> getPicture(); 76 virtual PassRefPtr<SkPicture> getPicture();
76 virtual void didClearCanvas() { } 77 virtual void didClearCanvas() { }
77 virtual void finalizeFrame(const FloatRect &dirtyRect) { } 78 virtual void finalizeFrame(const FloatRect &dirtyRect) { }
78 79
79 OpacityMode opacityMode() const { return m_opacityMode; } 80 OpacityMode opacityMode() const { return m_opacityMode; }
80 const IntSize& size() const { return m_size; } 81 const IntSize& size() const { return m_size; }
81 void notifyIsValidChanged(bool isValid) const; 82 void notifyIsValidChanged(bool isValid) const;
82 83
83 protected: 84 protected:
84 ImageBufferSurface(const IntSize&, OpacityMode); 85 ImageBufferSurface(const IntSize&, OpacityMode);
85 void clear(); 86 void clear();
86 87
87 private: 88 private:
88 OpacityMode m_opacityMode; 89 OpacityMode m_opacityMode;
89 IntSize m_size; 90 IntSize m_size;
90 }; 91 };
91 92
92 } // namespace blink 93 } // namespace blink
93 94
94 #endif 95 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698