| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "CCSolidColorLayerImpl.h" | 9 #include "CCSolidColorLayerImpl.h" |
| 10 | 10 |
| 11 #include "CCQuadSink.h" | 11 #include "CCQuadSink.h" |
| 12 #include "CCSolidColorDrawQuad.h" | 12 #include "CCSolidColorDrawQuad.h" |
| 13 #include <wtf/MathExtras.h> | 13 #include <wtf/MathExtras.h> |
| 14 #include <wtf/text/WTFString.h> | |
| 15 | 14 |
| 16 using namespace std; | 15 using namespace std; |
| 17 using WebKit::WebTransformationMatrix; | 16 using WebKit::WebTransformationMatrix; |
| 18 | 17 |
| 19 namespace WebCore { | 18 namespace WebCore { |
| 20 | 19 |
| 21 CCSolidColorLayerImpl::CCSolidColorLayerImpl(int id) | 20 CCSolidColorLayerImpl::CCSolidColorLayerImpl(int id) |
| 22 : CCLayerImpl(id) | 21 : CCLayerImpl(id) |
| 23 , m_tileSize(256) | 22 , m_tileSize(256) |
| 24 { | 23 { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 40 for (int x = 0; x < width; x += m_tileSize) { | 39 for (int x = 0; x < width; x += m_tileSize) { |
| 41 for (int y = 0; y < height; y += m_tileSize) { | 40 for (int y = 0; y < height; y += m_tileSize) { |
| 42 IntRect solidTileRect(x, y, min(width - x, m_tileSize), min(height -
y, m_tileSize)); | 41 IntRect solidTileRect(x, y, min(width - x, m_tileSize), min(height -
y, m_tileSize)); |
| 43 quadSink.append(CCSolidColorDrawQuad::create(sharedQuadState, solidT
ileRect, backgroundColor()), appendQuadsData); | 42 quadSink.append(CCSolidColorDrawQuad::create(sharedQuadState, solidT
ileRect, backgroundColor()), appendQuadsData); |
| 44 } | 43 } |
| 45 } | 44 } |
| 46 } | 45 } |
| 47 | 46 |
| 48 } // namespace WebCore | 47 } // namespace WebCore |
| 49 #endif // USE(ACCELERATED_COMPOSITING) | 48 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |