Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 // The texture will be used by the WebLayerTreeView during compositing passes. | 39 // The texture will be used by the WebLayerTreeView during compositing passes. |
| 40 // When in single-thread mode, this means during WebLayerTreeView::composite(). | 40 // When in single-thread mode, this means during WebLayerTreeView::composite(). |
| 41 // When using the threaded compositor, this can mean at an arbitrary time until | 41 // When using the threaded compositor, this can mean at an arbitrary time until |
| 42 // the WebLayerTreeView is destroyed. | 42 // the WebLayerTreeView is destroyed. |
| 43 class WebExternalTextureLayer { | 43 class WebExternalTextureLayer { |
| 44 public: | 44 public: |
| 45 virtual ~WebExternalTextureLayer() { } | 45 virtual ~WebExternalTextureLayer() { } |
| 46 | 46 |
| 47 virtual WebLayer* layer() = 0; | 47 virtual WebLayer* layer() = 0; |
| 48 | 48 |
| 49 // Clears texture from the layer. | |
| 50 virtual void clearTexture() { } | |
|
piman
2013/04/08 19:31:31
What does this mean exactly in terms of cc/ ?
Do y
alexst (slow to review)
2013/04/08 19:38:01
Yes, it's below. Basically the equivalent of layer
| |
| 51 | |
| 49 // Sets the texture id that represents the layer, in the namespace of the | 52 // Sets the texture id that represents the layer, in the namespace of the |
| 50 // compositor context. | 53 // compositor context. |
| 51 virtual void setTextureId(unsigned) = 0; | 54 virtual void setTextureId(unsigned) = 0; |
| 52 | 55 |
| 53 // Sets whether or not the texture should be flipped in the Y direction when | 56 // Sets whether or not the texture should be flipped in the Y direction when |
| 54 // rendered. | 57 // rendered. |
| 55 virtual void setFlipped(bool) = 0; | 58 virtual void setFlipped(bool) = 0; |
| 56 | 59 |
| 57 // Sets the rect in UV space of the texture that is mapped to the layer | 60 // Sets the rect in UV space of the texture that is mapped to the layer |
| 58 // bounds. | 61 // bounds. |
| 59 virtual void setUVRect(const WebFloatRect&) = 0; | 62 virtual void setUVRect(const WebFloatRect&) = 0; |
| 60 | 63 |
| 61 // Sets whether every pixel in this layer is opaque. Defaults to false. | 64 // Sets whether every pixel in this layer is opaque. Defaults to false. |
| 62 virtual void setOpaque(bool) = 0; | 65 virtual void setOpaque(bool) = 0; |
| 63 | 66 |
| 64 // Sets whether this layer's texture has premultiplied alpha or not. Default s to true. | 67 // Sets whether this layer's texture has premultiplied alpha or not. Default s to true. |
| 65 virtual void setPremultipliedAlpha(bool) = 0; | 68 virtual void setPremultipliedAlpha(bool) = 0; |
| 66 | 69 |
| 67 // Indicates that the most recently provided texture ID is about to be modif ied externally. | 70 // Indicates that the most recently provided texture ID is about to be modif ied externally. |
| 68 virtual void willModifyTexture() = 0; | 71 virtual void willModifyTexture() = 0; |
| 69 | 72 |
| 70 // Sets whether this context should be rate limited by the compositor. Rate limiting works by blocking | 73 // Sets whether this context should be rate limited by the compositor. Rate limiting works by blocking |
| 71 // invalidate() and invalidateRect() calls if the compositor is too many fra mes behind. | 74 // invalidate() and invalidateRect() calls if the compositor is too many fra mes behind. |
| 72 virtual void setRateLimitContext(bool) = 0; | 75 virtual void setRateLimitContext(bool) = 0; |
| 73 }; | 76 }; |
| 74 | 77 |
| 75 } // namespace WebKit | 78 } // namespace WebKit |
| 76 | 79 |
| 77 #endif // WebExternalTextureLayer_h | 80 #endif // WebExternalTextureLayer_h |
| OLD | NEW |