diff options
Diffstat (limited to 'cc/test/solid_color_content_layer_client.h')
-rw-r--r-- | cc/test/solid_color_content_layer_client.h | 30 |
1 files changed, 30 insertions, 0 deletions
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 0000000..ad7c0f0 --- /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_ |