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

Side by Side Diff: cc/LayerTextureUpdater.h

Issue 10947017: Enable removing uploads to evicted textures from texture upload queues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCThreadProxy.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 5
6 #ifndef LayerTextureUpdater_h 6 #ifndef LayerTextureUpdater_h
7 #define LayerTextureUpdater_h 7 #define LayerTextureUpdater_h
8 8
9 #if USE(ACCELERATED_COMPOSITING) 9 #if USE(ACCELERATED_COMPOSITING)
10 10
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 // Allows texture uploaders to store per-tile resources. 24 // Allows texture uploaders to store per-tile resources.
25 class Texture { 25 class Texture {
26 public: 26 public:
27 virtual ~Texture() { } 27 virtual ~Texture() { }
28 28
29 CCPrioritizedTexture* texture() { return m_texture.get(); } 29 CCPrioritizedTexture* texture() { return m_texture.get(); }
30 void swapTextureWith(OwnPtr<CCPrioritizedTexture>& texture) { m_texture. swap(texture); } 30 void swapTextureWith(OwnPtr<CCPrioritizedTexture>& texture) { m_texture. swap(texture); }
31 virtual void prepareRect(const IntRect& /* sourceRect */, CCRenderingSta ts&) { } 31 virtual void prepareRect(const IntRect& /* sourceRect */, CCRenderingSta ts&) { }
32 virtual void updateRect(CCResourceProvider*, const IntRect& sourceRect, const IntSize& destOffset) = 0; 32 virtual void updateRect(CCResourceProvider*, const IntRect& sourceRect, const IntSize& destOffset) = 0;
33 virtual bool backingResourceWasEvicted() const { return m_texture->backi ngResourceWasEvicted(); }
33 protected: 34 protected:
34 explicit Texture(PassOwnPtr<CCPrioritizedTexture> texture) : m_texture(t exture) { } 35 explicit Texture(PassOwnPtr<CCPrioritizedTexture> texture) : m_texture(t exture) { }
35 36
36 private: 37 private:
37 OwnPtr<CCPrioritizedTexture> m_texture; 38 OwnPtr<CCPrioritizedTexture> m_texture;
38 }; 39 };
39 40
40 LayerTextureUpdater() 41 LayerTextureUpdater()
41 { 42 {
42 turnOffVerifier(); // In the component build we don't have WTF threading initialized in this DLL so the thread verifier explodes. 43 turnOffVerifier(); // In the component build we don't have WTF threading initialized in this DLL so the thread verifier explodes.
(...skipping 16 matching lines...) Expand all
59 // then this region should be ignored in preference for the entire layer's a rea. 60 // then this region should be ignored in preference for the entire layer's a rea.
60 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa queRect, CCRenderingStats&) { } 61 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa queRect, CCRenderingStats&) { }
61 62
62 // Set true by the layer when it is known that the entire output is going to be opaque. 63 // Set true by the layer when it is known that the entire output is going to be opaque.
63 virtual void setOpaque(bool) { } 64 virtual void setOpaque(bool) { }
64 }; 65 };
65 66
66 } // namespace cc 67 } // namespace cc
67 #endif // USE(ACCELERATED_COMPOSITING) 68 #endif // USE(ACCELERATED_COMPOSITING)
68 #endif // LayerTextureUpdater_h 69 #endif // LayerTextureUpdater_h
OLDNEW
« no previous file with comments | « cc/CCThreadProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698