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

Unified Diff: cc/resources/content_layer_painter.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/resources/content_layer_painter.cc
diff --git a/cc/resources/content_layer_painter.cc b/cc/resources/content_layer_painter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..82c274b4f9c030f9e90997ab1c6eae5ab4d80315
--- /dev/null
+++ b/cc/resources/content_layer_painter.cc
@@ -0,0 +1,31 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/resources/content_layer_painter.h"
+
+#include "cc/layers/content_layer_client.h"
+
+namespace cc {
+
+ContentLayerPainter::ContentLayerPainter(ContentLayerClient* client)
+ : client_(client) {
+}
+
+scoped_ptr<ContentLayerPainter> ContentLayerPainter::Create(
+ ContentLayerClient* client) {
+ return make_scoped_ptr(new ContentLayerPainter(client));
+}
+
+void ContentLayerPainter::Paint(SkCanvas* canvas,
+ const gfx::Rect& content_rect,
+ bool can_paint_lcd_text,
+ gfx::RectF* opaque) {
+ client_->PaintContents(canvas,
+ content_rect,
+ can_paint_lcd_text,
+ opaque,
+ ContentLayerClient::GRAPHICS_CONTEXT_ENABLED);
+}
+
+} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698