| OLD | NEW |
| 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 #include "webkit/compositor_bindings/web_external_texture_layer_impl.h" | 5 #include "webkit/compositor_bindings/web_external_texture_layer_impl.h" |
| 6 | 6 |
| 7 #include "cc/resource_update_queue.h" | 7 #include "cc/resource_update_queue.h" |
| 8 #include "cc/texture_layer.h" | 8 #include "cc/texture_layer.h" |
| 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL
ayerClient.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL
ayerClient.h" |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 static_cast<TextureLayer*>(m_layer->layer())->setTextureId(id); | 42 static_cast<TextureLayer*>(m_layer->layer())->setTextureId(id); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void WebExternalTextureLayerImpl::setFlipped(bool flipped) | 45 void WebExternalTextureLayerImpl::setFlipped(bool flipped) |
| 46 { | 46 { |
| 47 static_cast<TextureLayer*>(m_layer->layer())->setFlipped(flipped); | 47 static_cast<TextureLayer*>(m_layer->layer())->setFlipped(flipped); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void WebExternalTextureLayerImpl::setUVRect(const WebFloatRect& rect) | 50 void WebExternalTextureLayerImpl::setUVRect(const WebFloatRect& rect) |
| 51 { | 51 { |
| 52 static_cast<TextureLayer*>(m_layer->layer())->setUVRect(rect); | 52 static_cast<TextureLayer*>(m_layer->layer())->setUV(gfx::PointF(rect.x, rect
.y), gfx::PointF(rect.x + rect.width, rect.y + rect.height)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void WebExternalTextureLayerImpl::setOpaque(bool opaque) | 55 void WebExternalTextureLayerImpl::setOpaque(bool opaque) |
| 56 { | 56 { |
| 57 static_cast<TextureLayer*>(m_layer->layer())->setContentsOpaque(opaque); | 57 static_cast<TextureLayer*>(m_layer->layer())->setContentsOpaque(opaque); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void WebExternalTextureLayerImpl::setPremultipliedAlpha(bool premultipliedAlpha) | 60 void WebExternalTextureLayerImpl::setPremultipliedAlpha(bool premultipliedAlpha) |
| 61 { | 61 { |
| 62 static_cast<TextureLayer*>(m_layer->layer())->setPremultipliedAlpha(premulti
pliedAlpha); | 62 static_cast<TextureLayer*>(m_layer->layer())->setPremultipliedAlpha(premulti
pliedAlpha); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 return m_client->prepareTexture(updaterImpl); | 96 return m_client->prepareTexture(updaterImpl); |
| 97 } | 97 } |
| 98 | 98 |
| 99 WebGraphicsContext3D* WebExternalTextureLayerImpl::context() | 99 WebGraphicsContext3D* WebExternalTextureLayerImpl::context() |
| 100 { | 100 { |
| 101 DCHECK(m_client); | 101 DCHECK(m_client); |
| 102 return m_client->context(); | 102 return m_client->context(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace WebKit | 105 } // namespace WebKit |
| OLD | NEW |