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 #include "TiledLayerChromium.h" | 7 #include "TiledLayerChromium.h" |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "third_party/khronos/GLES2/gl2.h" |
10 #include "CCLayerImpl.h" | 11 #include "CCLayerImpl.h" |
11 #include "CCLayerTreeHost.h" | 12 #include "CCLayerTreeHost.h" |
12 #include "CCOverdrawMetrics.h" | 13 #include "CCOverdrawMetrics.h" |
13 #include "CCTextureUpdateQueue.h" | 14 #include "CCTextureUpdateQueue.h" |
14 #include "CCTiledLayerImpl.h" | 15 #include "CCTiledLayerImpl.h" |
15 #include "GraphicsContext3D.h" | |
16 #include "Region.h" | 16 #include "Region.h" |
17 #include <wtf/CurrentTime.h> | 17 #include <wtf/CurrentTime.h> |
18 #include <wtf/MathExtras.h> | 18 #include <wtf/MathExtras.h> |
19 | 19 |
20 using namespace std; | 20 using namespace std; |
21 using WebKit::WebTransformationMatrix; | 21 using WebKit::WebTransformationMatrix; |
22 | 22 |
23 namespace cc { | 23 namespace cc { |
24 | 24 |
25 class UpdatableTile : public CCLayerTilingData::Tile { | 25 class UpdatableTile : public CCLayerTilingData::Tile { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 { | 72 { |
73 } | 73 } |
74 | 74 |
75 OwnPtr<LayerTextureUpdater::Texture> m_texture; | 75 OwnPtr<LayerTextureUpdater::Texture> m_texture; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(UpdatableTile); | 77 DISALLOW_COPY_AND_ASSIGN(UpdatableTile); |
78 }; | 78 }; |
79 | 79 |
80 TiledLayerChromium::TiledLayerChromium() | 80 TiledLayerChromium::TiledLayerChromium() |
81 : LayerChromium() | 81 : LayerChromium() |
82 , m_textureFormat(GraphicsContext3D::INVALID_ENUM) | 82 , m_textureFormat(GL_INVALID_ENUM) |
83 , m_skipsDraw(false) | 83 , m_skipsDraw(false) |
84 , m_failedUpdate(false) | 84 , m_failedUpdate(false) |
85 , m_sampledTexelFormat(LayerTextureUpdater::SampledTexelFormatInvalid) | 85 , m_sampledTexelFormat(LayerTextureUpdater::SampledTexelFormatInvalid) |
86 , m_tilingOption(AutoTile) | 86 , m_tilingOption(AutoTile) |
87 { | 87 { |
88 m_tiler = CCLayerTilingData::create(IntSize(), CCLayerTilingData::HasBorderT
exels); | 88 m_tiler = CCLayerTilingData::create(IntSize(), CCLayerTilingData::HasBorderT
exels); |
89 } | 89 } |
90 | 90 |
91 TiledLayerChromium::~TiledLayerChromium() | 91 TiledLayerChromium::~TiledLayerChromium() |
92 { | 92 { |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 IntRect prepaintRect = visibleContentRect(); | 803 IntRect prepaintRect = visibleContentRect(); |
804 prepaintRect.inflateX(m_tiler->tileSize().width()); | 804 prepaintRect.inflateX(m_tiler->tileSize().width()); |
805 prepaintRect.inflateY(m_tiler->tileSize().height() * 2); | 805 prepaintRect.inflateY(m_tiler->tileSize().height() * 2); |
806 IntRect contentRect(IntPoint::zero(), contentBounds()); | 806 IntRect contentRect(IntPoint::zero(), contentBounds()); |
807 prepaintRect.intersect(contentRect); | 807 prepaintRect.intersect(contentRect); |
808 | 808 |
809 return prepaintRect; | 809 return prepaintRect; |
810 } | 810 } |
811 | 811 |
812 } | 812 } |
OLD | NEW |