Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h

Issue 7590009: Merge 92255 - Source/WebCore: [Chromium] Use edge-distance method for layer anti-aliasing. (Closed) Base URL:
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 side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h
--- Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h (revision 92714)
+++ Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h (working copy)
@@ -75,11 +75,15 @@
// recycled by the texture manager.
void protectTileTextures(const IntRect& contentRect);
- typedef ProgramBinding<VertexShaderQuad, FragmentShaderRGBATexAlpha> Program;
+ typedef ProgramBinding<VertexShaderTile, FragmentShaderRGBATexAlpha> Program;
// Shader program that swaps red and blue components of texture.
// Used when texture format does not match native color format.
- typedef ProgramBinding<VertexShaderQuad, FragmentShaderRGBATexSwizzleAlpha> ProgramSwizzle;
+ typedef ProgramBinding<VertexShaderTile, FragmentShaderRGBATexSwizzleAlpha> ProgramSwizzle;
+ // Shader program that produces anti-aliased layer edges.
+ typedef ProgramBinding<VertexShaderTile, FragmentShaderRGBATexAlphaAA> ProgramAA;
+ typedef ProgramBinding<VertexShaderTile, FragmentShaderRGBATexSwizzleAlphaAA> ProgramSwizzleAA;
// If this tiler has exactly one tile, return its texture. Otherwise, null.
LayerTexture* getSingleTexture();
@@ -110,15 +114,8 @@
// Draw all tiles that intersect with contentRect.
template <class T>
- void drawTiles(const IntRect& contentRect, const TransformationMatrix&, float opacity, const T* program);
+ void drawTiles(const IntRect& contentRect, const TransformationMatrix&, float opacity, const T* program, int fragmentTexTransformLocation, int edgeLocation);
- template <class T>
- void drawTexturedQuad(GraphicsContext3D*, const FloatQuad&, const TransformationMatrix& projectionMatrix, const TransformationMatrix& drawMatrix,
- float width, float height, float opacity,
- float texTranslateX, float texTranslateY,
- float texScaleX, float texScaleY,
- const T* program);
// Grow layer size to contain this rectangle.
void growLayerToContain(const IntRect& contentRect);
@@ -135,7 +132,6 @@
Tile* tileAt(int, int) const;
IntRect tileContentRect(const Tile*) const;
IntRect tileLayerRect(const Tile*) const;
- IntRect tileTexRect(const Tile*) const;
GC3Denum m_textureFormat;

Powered by Google App Engine
This is Rietveld 408576698