| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
| 8 | 8 |
| 9 #include "CCVideoLayerImpl.h" | 9 #include "CCVideoLayerImpl.h" |
| 10 | 10 |
| 11 #include "CCIOSurfaceDrawQuad.h" | 11 #include "CCIOSurfaceDrawQuad.h" |
| 12 #include "CCLayerTreeHostImpl.h" | 12 #include "CCLayerTreeHostImpl.h" |
| 13 #include "CCProxy.h" | 13 #include "CCProxy.h" |
| 14 #include "CCQuadSink.h" | 14 #include "CCQuadSink.h" |
| 15 #include "CCResourceProvider.h" | 15 #include "CCResourceProvider.h" |
| 16 #include "CCStreamVideoDrawQuad.h" | 16 #include "CCStreamVideoDrawQuad.h" |
| 17 #include "CCTextureDrawQuad.h" | 17 #include "CCTextureDrawQuad.h" |
| 18 #include "CCYUVVideoDrawQuad.h" | 18 #include "CCYUVVideoDrawQuad.h" |
| 19 #include "Extensions3DChromium.h" | 19 #include "Extensions3DChromium.h" |
| 20 #include "GraphicsContext3D.h" | 20 #include "GraphicsContext3D.h" |
| 21 #include "NotImplemented.h" | 21 #include "NotImplemented.h" |
| 22 #include "TextStream.h" | |
| 23 #include <public/WebVideoFrame.h> | 22 #include <public/WebVideoFrame.h> |
| 24 #include <wtf/text/WTFString.h> | |
| 25 | 23 |
| 26 namespace WebCore { | 24 namespace WebCore { |
| 27 | 25 |
| 28 CCVideoLayerImpl::CCVideoLayerImpl(int id, WebKit::WebVideoFrameProvider* provid
er) | 26 CCVideoLayerImpl::CCVideoLayerImpl(int id, WebKit::WebVideoFrameProvider* provid
er) |
| 29 : CCLayerImpl(id) | 27 : CCLayerImpl(id) |
| 30 , m_provider(provider) | 28 , m_provider(provider) |
| 31 , m_frame(0) | 29 , m_frame(0) |
| 32 , m_externalTextureResource(0) | 30 , m_externalTextureResource(0) |
| 33 { | 31 { |
| 34 // This matrix is the default transformation for stream textures, and flips
on the Y axis. | 32 // This matrix is the default transformation for stream textures, and flips
on the Y axis. |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 void CCVideoLayerImpl::didLoseContext() | 367 void CCVideoLayerImpl::didLoseContext() |
| 370 { | 368 { |
| 371 freePlaneData(layerTreeHostImpl()->resourceProvider()); | 369 freePlaneData(layerTreeHostImpl()->resourceProvider()); |
| 372 } | 370 } |
| 373 | 371 |
| 374 void CCVideoLayerImpl::setNeedsRedraw() | 372 void CCVideoLayerImpl::setNeedsRedraw() |
| 375 { | 373 { |
| 376 layerTreeHostImpl()->setNeedsRedraw(); | 374 layerTreeHostImpl()->setNeedsRedraw(); |
| 377 } | 375 } |
| 378 | 376 |
| 379 void CCVideoLayerImpl::dumpLayerProperties(TextStream& ts, int indent) const | 377 void CCVideoLayerImpl::dumpLayerProperties(std::string* str, int indent) const |
| 380 { | 378 { |
| 381 writeIndent(ts, indent); | 379 str->append(indentString(indent)); |
| 382 ts << "video layer\n"; | 380 str->append("video layer\n"); |
| 383 CCLayerImpl::dumpLayerProperties(ts, indent); | 381 CCLayerImpl::dumpLayerProperties(str, indent); |
| 384 } | 382 } |
| 385 | 383 |
| 386 } | 384 } |
| 387 | 385 |
| 388 #endif // USE(ACCELERATED_COMPOSITING) | 386 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |