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

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

Issue 7629002: Merge 92867 - [Chromium] Temporarily disable layer anti-aliasing on ChromeOS. (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 | « Source/WebCore/ChangeLog ('k') | 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 void LayerTilerChromium::setLayerPosition(const IntPoint& layerPosition) 370 void LayerTilerChromium::setLayerPosition(const IntPoint& layerPosition)
371 { 371 {
372 m_layerPosition = layerPosition; 372 m_layerPosition = layerPosition;
373 } 373 }
374 374
375 void LayerTilerChromium::draw(const IntRect& contentRect, const TransformationMa trix& globalTransform, float opacity) 375 void LayerTilerChromium::draw(const IntRect& contentRect, const TransformationMa trix& globalTransform, float opacity)
376 { 376 {
377 if (m_skipsDraw || !m_tiles.size() || contentRect.isEmpty()) 377 if (m_skipsDraw || !m_tiles.size() || contentRect.isEmpty())
378 return; 378 return;
379 379
380 #if defined(OS_CHROMEOS)
381 // FIXME: Disable anti-aliasing to workaround broken driver.
382 bool useAA = false;
383 #else
380 // Use anti-aliasing programs when border texels are preset and transform 384 // Use anti-aliasing programs when border texels are preset and transform
381 // is not an integer translation. 385 // is not an integer translation.
382 bool useAA = (m_tilingData.borderTexels() && !globalTransform.isIntegerTrans lation()); 386 bool useAA = (m_tilingData.borderTexels() && !globalTransform.isIntegerTrans lation());
387 #endif
383 388
384 switch (m_sampledTexelFormat) { 389 switch (m_sampledTexelFormat) {
385 case LayerTextureUpdater::SampledTexelFormatRGBA: 390 case LayerTextureUpdater::SampledTexelFormatRGBA:
386 if (useAA) 391 if (useAA)
387 drawTiles(contentRect, globalTransform, opacity, layerRenderer()->ti lerProgramAA(), layerRenderer()->tilerProgramAA()->fragmentShader().fragmentTexT ransformLocation(), layerRenderer()->tilerProgramAA()->fragmentShader().edgeLoca tion()); 392 drawTiles(contentRect, globalTransform, opacity, layerRenderer()->ti lerProgramAA(), layerRenderer()->tilerProgramAA()->fragmentShader().fragmentTexT ransformLocation(), layerRenderer()->tilerProgramAA()->fragmentShader().edgeLoca tion());
388 else 393 else
389 drawTiles(contentRect, globalTransform, opacity, layerRenderer()->ti lerProgram(), -1, -1); 394 drawTiles(contentRect, globalTransform, opacity, layerRenderer()->ti lerProgram(), -1, -1);
390 break; 395 break;
391 case LayerTextureUpdater::SampledTexelFormatBGRA: 396 case LayerTextureUpdater::SampledTexelFormatBGRA:
392 if (useAA) 397 if (useAA)
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 660
656 prevEdgeY = edgeY; 661 prevEdgeY = edgeY;
657 // Reverse direction. 662 // Reverse direction.
658 prevEdgeY.scale(-1, -1, -1); 663 prevEdgeY.scale(-1, -1, -1);
659 } 664 }
660 } 665 }
661 666
662 } // namespace WebCore 667 } // namespace WebCore
663 668
664 #endif // USE(ACCELERATED_COMPOSITING) 669 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698