| 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 | 5 |
| 6 #include "config.h" | 6 #include "config.h" |
| 7 | 7 |
| 8 #if USE(ACCELERATED_COMPOSITING) | 8 #if USE(ACCELERATED_COMPOSITING) |
| 9 | 9 |
| 10 #include "FrameBufferSkPictureCanvasLayerTextureUpdater.h" | 10 #include "FrameBufferSkPictureCanvasLayerTextureUpdater.h" |
| 11 | 11 |
| 12 #include "CCProxy.h" | 12 #include "CCProxy.h" |
| 13 #include "LayerPainterChromium.h" | 13 #include "LayerPainterChromium.h" |
| 14 #include "SkCanvas.h" | 14 #include "SkCanvas.h" |
| 15 #include "SkGpuDevice.h" | 15 #include "SkGpuDevice.h" |
| 16 #include <public/WebGraphicsContext3D.h> | 16 #include <public/WebGraphicsContext3D.h> |
| 17 #include <public/WebSharedGraphicsContext3D.h> | 17 #include <public/WebSharedGraphicsContext3D.h> |
| 18 | 18 |
| 19 using WebKit::WebGraphicsContext3D; | 19 using WebKit::WebGraphicsContext3D; |
| 20 using WebKit::WebSharedGraphicsContext3D; | 20 using WebKit::WebSharedGraphicsContext3D; |
| 21 | 21 |
| 22 namespace WebCore { | 22 namespace cc { |
| 23 | 23 |
| 24 static PassOwnPtr<SkCanvas> createAcceleratedCanvas(GrContext* grContext, | 24 static PassOwnPtr<SkCanvas> createAcceleratedCanvas(GrContext* grContext, |
| 25 IntSize canvasSize, | 25 IntSize canvasSize, |
| 26 unsigned textureId) | 26 unsigned textureId) |
| 27 { | 27 { |
| 28 GrPlatformTextureDesc textureDesc; | 28 GrPlatformTextureDesc textureDesc; |
| 29 textureDesc.fFlags = kRenderTarget_GrPlatformTextureFlag; | 29 textureDesc.fFlags = kRenderTarget_GrPlatformTextureFlag; |
| 30 textureDesc.fWidth = canvasSize.width(); | 30 textureDesc.fWidth = canvasSize.width(); |
| 31 textureDesc.fHeight = canvasSize.height(); | 31 textureDesc.fHeight = canvasSize.height(); |
| 32 textureDesc.fConfig = kSkia8888_GrPixelConfig; | 32 textureDesc.fConfig = kSkia8888_GrPixelConfig; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 contentRect().y() - sourceRect.y() + destOffset.height()); | 108 contentRect().y() - sourceRect.y() + destOffset.height()); |
| 109 drawPicture(canvas.get()); | 109 drawPicture(canvas.get()); |
| 110 | 110 |
| 111 // Flush ganesh context so that all the rendered stuff appears on the textur
e. | 111 // Flush ganesh context so that all the rendered stuff appears on the textur
e. |
| 112 grContext->flush(); | 112 grContext->flush(); |
| 113 | 113 |
| 114 // Flush the GL context so rendering results from this context are visible i
n the compositor's context. | 114 // Flush the GL context so rendering results from this context are visible i
n the compositor's context. |
| 115 context->flush(); | 115 context->flush(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace WebCore | 118 } // namespace cc |
| 119 #endif // USE(ACCELERATED_COMPOSITING) | 119 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |