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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h

Issue 2323573002: Revert of Allow canvases to be GPU-accelerated in Workers (Closed)
Patch Set: Created 4 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef StaticBitmapImage_h 5 #ifndef StaticBitmapImage_h
6 #define StaticBitmapImage_h 6 #define StaticBitmapImage_h
7 7
8 #include "platform/graphics/Image.h" 8 #include "platform/graphics/Image.h"
9 #include "third_party/khronos/GLES2/gl2.h" 9 #include "third_party/khronos/GLES2/gl2.h"
10 #include "third_party/skia/include/core/SkRefCnt.h" 10 #include "third_party/skia/include/core/SkRefCnt.h"
(...skipping 16 matching lines...) Expand all
27 27
28 sk_sp<SkImage> imageForCurrentFrame() override; 28 sk_sp<SkImage> imageForCurrentFrame() override;
29 29
30 bool originClean() const { return m_isOriginClean; } 30 bool originClean() const { return m_isOriginClean; }
31 void setOriginClean(bool flag) { m_isOriginClean = flag; } 31 void setOriginClean(bool flag) { m_isOriginClean = flag; }
32 bool isPremultiplied() const { return m_isPremultiplied; } 32 bool isPremultiplied() const { return m_isPremultiplied; }
33 void setPremultiplied(bool flag) { m_isPremultiplied = flag; } 33 void setPremultiplied(bool flag) { m_isPremultiplied = flag; }
34 bool isTextureBacked() override; 34 bool isTextureBacked() override;
35 virtual void copyToTexture(WebGraphicsContext3DProvider*, GLuint, GLenum, GL enum, bool) { NOTREACHED(); } 35 virtual void copyToTexture(WebGraphicsContext3DProvider*, GLuint, GLenum, GL enum, bool) { NOTREACHED(); }
36 virtual bool hasMailbox() { return false; } 36 virtual bool hasMailbox() { return false; }
37 virtual void transfer() { }
38 37
39 protected: 38 protected:
40 StaticBitmapImage(sk_sp<SkImage>); 39 StaticBitmapImage(sk_sp<SkImage>);
41 StaticBitmapImage() { } // empty constructor for derived class. 40 StaticBitmapImage() { } // empty constructor for derived class.
42 sk_sp<SkImage> m_image; 41 sk_sp<SkImage> m_image;
43 42
44 private: 43 private:
45 bool m_isOriginClean = true; 44 bool m_isOriginClean = true;
46 // The premultiply info is stored here because the SkImage API 45 // The premultiply info is stored here because the SkImage API
47 // doesn't expose this info. 46 // doesn't expose this info.
48 bool m_isPremultiplied = true; 47 bool m_isPremultiplied = true;
49 }; 48 };
50 49
51 } // namespace blink 50 } // namespace blink
52 51
53 #endif 52 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.h ('k') | third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698