Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp

Issue 7508041: Merge 92331 - [chromium] Fix issue where switching composited tabs evicts root textures (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698