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

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

Issue 2738573002: Streamline the presentation of ImageBitmapRenderingContext (Closed)
Patch Set: Fix crash in gpu test Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 AcceleratedStaticBitmapImage_h 5 #ifndef AcceleratedStaticBitmapImage_h
6 #define AcceleratedStaticBitmapImage_h 6 #define AcceleratedStaticBitmapImage_h
7 7
8 #include "base/threading/thread_checker.h" 8 #include "base/threading/thread_checker.h"
9 #include "platform/graphics/StaticBitmapImage.h" 9 #include "platform/graphics/StaticBitmapImage.h"
10 #include "platform/graphics/TextureHolder.h" 10 #include "platform/graphics/TextureHolder.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 RespectImageOrientationEnum, 48 RespectImageOrientationEnum,
49 ImageClampingMode) override; 49 ImageClampingMode) override;
50 50
51 void copyToTexture(WebGraphicsContext3DProvider*, 51 void copyToTexture(WebGraphicsContext3DProvider*,
52 GLuint destTextureId, 52 GLuint destTextureId,
53 GLenum destInternalFormat, 53 GLenum destInternalFormat,
54 GLenum destType, 54 GLenum destType,
55 bool flipY) override; 55 bool flipY) override;
56 56
57 bool hasMailbox() final { return m_textureHolder->isMailboxTextureHolder(); } 57 bool hasMailbox() final { return m_textureHolder->isMailboxTextureHolder(); }
58 bool isAccelerated() final { return true; }
xlai (Olivia) 2017/03/24 19:12:42 You don't need to add this function. isTextureBack
58 // To be called on sender thread before performing a transfer 59 // To be called on sender thread before performing a transfer
59 void transfer() final; 60 void transfer() final;
60 61
61 void ensureMailbox() final; 62 void ensureMailbox() final;
62 gpu::Mailbox mailbox() final { return m_textureHolder->mailbox(); } 63 gpu::Mailbox mailbox() final { return m_textureHolder->mailbox(); }
63 gpu::SyncToken syncToken() final { return m_textureHolder->syncToken(); } 64 gpu::SyncToken syncToken() final { return m_textureHolder->syncToken(); }
64 void updateSyncToken(gpu::SyncToken) final; 65 void updateSyncToken(gpu::SyncToken) final;
65 66
66 private: 67 private:
67 AcceleratedStaticBitmapImage(sk_sp<SkImage>); 68 AcceleratedStaticBitmapImage(sk_sp<SkImage>);
(...skipping 10 matching lines...) Expand all
78 79
79 std::unique_ptr<TextureHolder> m_textureHolder; 80 std::unique_ptr<TextureHolder> m_textureHolder;
80 81
81 base::ThreadChecker m_threadChecker; 82 base::ThreadChecker m_threadChecker;
82 bool m_detachThreadAtNextCheck = false; 83 bool m_detachThreadAtNextCheck = false;
83 }; 84 };
84 85
85 } // namespace blink 86 } // namespace blink
86 87
87 #endif 88 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698