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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 { | 247 { |
248 if (contentRect.isEmpty()) | 248 if (contentRect.isEmpty()) |
249 return; | 249 return; |
250 | 250 |
251 int left, top, right, bottom; | 251 int left, top, right, bottom; |
252 contentRectToTileIndices(contentRect, left, top, right, bottom); | 252 contentRectToTileIndices(contentRect, left, top, right, bottom); |
253 | 253 |
254 for (int j = top; j <= bottom; ++j) { | 254 for (int j = top; j <= bottom; ++j) { |
255 for (int i = left; i <= right; ++i) { | 255 for (int i = left; i <= right; ++i) { |
256 Tile* tile = tileAt(i, j); | 256 Tile* tile = tileAt(i, j); |
257 if (!tile || !tile->texture()->isValid(m_tileSize, GraphicsContext3D
::RGBA)) | 257 if (!tile || !tile->texture()->isValid(m_tileSize, m_textureFormat)) |
258 continue; | 258 continue; |
259 | 259 |
260 tile->texture()->reserve(m_tileSize, GraphicsContext3D::RGBA); | 260 tile->texture()->reserve(m_tileSize, m_textureFormat); |
261 } | 261 } |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 void LayerTilerChromium::prepareToUpdate(const IntRect& contentRect, LayerTextur
eUpdater* textureUpdater) | 265 void LayerTilerChromium::prepareToUpdate(const IntRect& contentRect, LayerTextur
eUpdater* textureUpdater) |
266 { | 266 { |
267 m_skipsDraw = false; | 267 m_skipsDraw = false; |
268 | 268 |
269 if (contentRect.isEmpty()) { | 269 if (contentRect.isEmpty()) { |
270 m_updateRect = IntRect(); | 270 m_updateRect = IntRect(); |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 point[6] = quad.p4().x(); | 628 point[6] = quad.p4().x(); |
629 point[7] = quad.p4().y(); | 629 point[7] = quad.p4().y(); |
630 GLC(context, context->uniform2fv(program->vertexShader().pointLocation(), po
int, 4)); | 630 GLC(context, context->uniform2fv(program->vertexShader().pointLocation(), po
int, 4)); |
631 | 631 |
632 GLC(context, context->drawElements(GraphicsContext3D::TRIANGLES, 6, Graphics
Context3D::UNSIGNED_SHORT, 0)); | 632 GLC(context, context->drawElements(GraphicsContext3D::TRIANGLES, 6, Graphics
Context3D::UNSIGNED_SHORT, 0)); |
633 } | 633 } |
634 | 634 |
635 } // namespace WebCore | 635 } // namespace WebCore |
636 | 636 |
637 #endif // USE(ACCELERATED_COMPOSITING) | 637 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |