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

Unified Diff: cc/layers/content_layer_unittest.cc

Issue 315393002: Record SkPicture with correct LCD text setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated unittests Created 6 years, 6 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: cc/layers/content_layer_unittest.cc
diff --git a/cc/layers/content_layer_unittest.cc b/cc/layers/content_layer_unittest.cc
index f450149d4f6f751ef49b5e5214958860f79d7d6f..96ff19f6b4ac57435dcfff29f52063e94db30bcd 100644
--- a/cc/layers/content_layer_unittest.cc
+++ b/cc/layers/content_layer_unittest.cc
@@ -6,6 +6,7 @@
#include "cc/layers/content_layer_client.h"
#include "cc/resources/bitmap_content_layer_updater.h"
+#include "cc/resources/content_layer_painter.h"
#include "cc/test/fake_rendering_stats_instrumentation.h"
#include "cc/test/geometry_test_utils.h"
#include "skia/ext/platform_canvas.h"
@@ -23,11 +24,12 @@ class MockContentLayerClient : public ContentLayerClient {
virtual void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
+ bool can_paint_lcd_text,
gfx::RectF* opaque,
ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE {
*opaque = gfx::RectF(opaque_layer_rect_);
}
- virtual void DidChangeLayerCanUseLCDText() OVERRIDE {}
+ virtual bool PaintsLCDText() const OVERRIDE { return false; }
virtual bool FillsBoundsCompletely() const OVERRIDE { return false; }
private:
@@ -44,9 +46,7 @@ TEST(ContentLayerTest, ContentLayerPainterWithDeviceScale) {
FakeRenderingStatsInstrumentation stats_instrumentation;
scoped_refptr<BitmapContentLayerUpdater> updater =
BitmapContentLayerUpdater::Create(
- ContentLayerPainter::Create(&client).PassAs<LayerPainter>(),
- &stats_instrumentation,
- 0);
+ ContentLayerPainter::Create(&client), &stats_instrumentation, 0);
gfx::Rect resulting_opaque_rect;
updater->PrepareToUpdate(content_rect,

Powered by Google App Engine
This is Rietveld 408576698