OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "CanvasLayerChromium.h" | 35 #include "CanvasLayerChromium.h" |
36 | 36 |
37 #include "cc/CCLayerImpl.h" | 37 #include "cc/CCLayerImpl.h" |
38 #include "GraphicsContext3D.h" | 38 #include "GraphicsContext3D.h" |
39 #include "LayerRendererChromium.h" | 39 #include "LayerRendererChromium.h" |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 CanvasLayerChromium::CanvasLayerChromium(GraphicsLayerChromium* owner) | 43 CanvasLayerChromium::CanvasLayerChromium(GraphicsLayerChromium* owner) |
44 : LayerChromium(owner) | 44 : LayerChromium(owner) |
45 , m_textureChanged(true) | |
46 , m_textureId(0) | |
47 , m_hasAlpha(true) | 45 , m_hasAlpha(true) |
48 , m_premultipliedAlpha(true) | 46 , m_premultipliedAlpha(true) |
49 { | 47 { |
50 } | 48 } |
51 | 49 |
52 CanvasLayerChromium::~CanvasLayerChromium() | 50 CanvasLayerChromium::~CanvasLayerChromium() |
53 { | 51 { |
54 } | 52 } |
55 | 53 |
56 PassRefPtr<CCLayerImpl> CanvasLayerChromium::createCCLayerImpl() | 54 PassRefPtr<CCLayerImpl> CanvasLayerChromium::createCCLayerImpl() |
57 { | 55 { |
58 return CCCanvasLayerImpl::create(this, m_layerId); | 56 return CCCanvasLayerImpl::create(this, m_layerId); |
59 } | 57 } |
60 | 58 |
61 void CanvasLayerChromium::pushPropertiesTo(CCLayerImpl* layer) | 59 void CanvasLayerChromium::pushPropertiesTo(CCLayerImpl* layer) |
62 { | 60 { |
63 LayerChromium::pushPropertiesTo(layer); | 61 LayerChromium::pushPropertiesTo(layer); |
64 | 62 |
65 CCCanvasLayerImpl* canvasLayer = static_cast<CCCanvasLayerImpl*>(layer); | 63 CCCanvasLayerImpl* canvasLayer = static_cast<CCCanvasLayerImpl*>(layer); |
66 canvasLayer->setTextureId(m_textureId); | 64 canvasLayer->setTextureId(textureId()); |
67 canvasLayer->setHasAlpha(m_hasAlpha); | 65 canvasLayer->setHasAlpha(m_hasAlpha); |
68 canvasLayer->setPremultipliedAlpha(m_premultipliedAlpha); | 66 canvasLayer->setPremultipliedAlpha(m_premultipliedAlpha); |
69 } | 67 } |
70 | 68 |
71 } | 69 } |
72 #endif // USE(ACCELERATED_COMPOSITING) | 70 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |