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

Side by Side Diff: cc/tiled_layer_unittest.cc

Issue 11609002: cc: Create a cc::ScrollbarThemePainter and an adapter class in compositor bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: notry Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_web_scrollbar.cc ('k') | webkit/compositor_bindings/compositor_bindings.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/tiled_layer.h" 5 #include "cc/tiled_layer.h"
6 6
7 #include "cc/bitmap_content_layer_updater.h" 7 #include "cc/bitmap_content_layer_updater.h"
8 #include "cc/layer_painter.h" 8 #include "cc/layer_painter.h"
9 #include "cc/overdraw_metrics.h" 9 #include "cc/overdraw_metrics.h"
10 #include "cc/rendering_stats.h" 10 #include "cc/rendering_stats.h"
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 m_layerTreeHost->commitComplete(); 1564 m_layerTreeHost->commitComplete();
1565 1565
1566 resourceManagerClearAllMemory(m_layerTreeHost->contentsTextureManager(), m_r esourceProvider.get()); 1566 resourceManagerClearAllMemory(m_layerTreeHost->contentsTextureManager(), m_r esourceProvider.get());
1567 m_layerTreeHost->setRootLayer(0); 1567 m_layerTreeHost->setRootLayer(0);
1568 } 1568 }
1569 1569
1570 class TrackingLayerPainter : public LayerPainter { 1570 class TrackingLayerPainter : public LayerPainter {
1571 public: 1571 public:
1572 static scoped_ptr<TrackingLayerPainter> create() { return make_scoped_ptr(ne w TrackingLayerPainter()); } 1572 static scoped_ptr<TrackingLayerPainter> create() { return make_scoped_ptr(ne w TrackingLayerPainter()); }
1573 1573
1574 virtual void paint(SkCanvas*, const gfx::Rect& contentRect, gfx::RectF&) OVE RRIDE 1574 virtual void paint(SkCanvas*, gfx::Rect contentRect, gfx::RectF&) OVERRIDE
1575 { 1575 {
1576 m_paintedRect = contentRect; 1576 m_paintedRect = contentRect;
1577 } 1577 }
1578 1578
1579 const gfx::Rect& paintedRect() const { return m_paintedRect; } 1579 const gfx::Rect& paintedRect() const { return m_paintedRect; }
1580 void resetPaintedRect() { m_paintedRect = gfx::Rect(); } 1580 void resetPaintedRect() { m_paintedRect = gfx::Rect(); }
1581 1581
1582 private: 1582 private:
1583 TrackingLayerPainter() { } 1583 TrackingLayerPainter() { }
1584 1584
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 1663
1664 // Invalidate the entire layer in layer space. When painting, the rect given to webkit should match the layer's bounds. 1664 // Invalidate the entire layer in layer space. When painting, the rect given to webkit should match the layer's bounds.
1665 layer->setNeedsDisplayRect(layerRect); 1665 layer->setNeedsDisplayRect(layerRect);
1666 layer->update(*m_queue.get(), 0, m_stats); 1666 layer->update(*m_queue.get(), 0, m_stats);
1667 1667
1668 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); 1668 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect());
1669 } 1669 }
1670 1670
1671 } // namespace 1671 } // namespace
1672 } // namespace cc 1672 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_web_scrollbar.cc ('k') | webkit/compositor_bindings/compositor_bindings.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698