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

Unified Diff: cc/test/solid_color_content_layer_client.h

Issue 17335011: cc: Allow output readback/copy requests to specify a sub-rect to copy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copy-subrect: 3 patches in one Created 7 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
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/test/solid_color_content_layer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/solid_color_content_layer_client.h
diff --git a/cc/test/solid_color_content_layer_client.h b/cc/test/solid_color_content_layer_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad7c0f008675acc6154513b78bb5493ea097c8dc
--- /dev/null
+++ b/cc/test/solid_color_content_layer_client.h
@@ -0,0 +1,30 @@
+// Copyright 2013 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.
+
+#ifndef CC_TEST_SOLID_COLOR_CONTENT_LAYER_CLIENT_H_
+#define CC_TEST_SOLID_COLOR_CONTENT_LAYER_CLIENT_H_
+
+#include "base/compiler_specific.h"
+#include "cc/layers/content_layer_client.h"
+#include "third_party/skia/include/core/SkColor.h"
+
+namespace cc {
+
+class SolidColorContentLayerClient : public cc::ContentLayerClient {
+ public:
+ explicit SolidColorContentLayerClient(SkColor color) : color_(color) {}
+
+ // ContentLayerClient implementation.
+ virtual void DidChangeLayerCanUseLCDText() OVERRIDE {}
+ virtual void PaintContents(SkCanvas* canvas,
+ gfx::Rect rect,
+ gfx::RectF* opaque_rect) OVERRIDE;
+
+ private:
+ SkColor color_;
+};
+
+} // namespace cc
+
+#endif // CC_TEST_SOLID_COLOR_CONTENT_LAYER_CLIENT_H_
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/test/solid_color_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698