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

Unified Diff: sky/compositor/display_delegate_bitmap.h

Issue 797063002: Make reftests work for sky. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address review comments Created 6 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 side-by-side diff with in-line comments
Download patch
Index: sky/compositor/display_delegate_bitmap.h
diff --git a/sky/compositor/display_delegate_bitmap.h b/sky/compositor/display_delegate_bitmap.h
new file mode 100644
index 0000000000000000000000000000000000000000..aa198ddc7f7e001a9d04aa31bbe155b24a3a9432
--- /dev/null
+++ b/sky/compositor/display_delegate_bitmap.h
@@ -0,0 +1,33 @@
+// 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.
+
+#ifndef SKY_COMPOSITOR_DISPLAY_DELEGATE_BITMAP_H_
+#define SKY_COMPOSITOR_DISPLAY_DELEGATE_BITMAP_H_
+
+#include "sky/compositor/display_delegate.h"
+
+namespace sky {
+
+class LayerClient;
+
+class DisplayDelegateBitmap : public DisplayDelegate {
esprehn 2014/12/13 00:24:42 final
+ public:
+ DisplayDelegateBitmap(LayerClient* client);
esprehn 2014/12/13 00:24:42 explicit
+ ~DisplayDelegateBitmap() override;
+
+ static DisplayDelegate* create(LayerClient* client);
+
+ void GetPixelsForTesting(std::vector<unsigned char>* pixels) override;
+ void Paint(mojo::GaneshSurface& surface, const gfx::Rect& size) override;
+
+ private:
+ SkBitmap bitmap_;
+ LayerClient* client_;
+
+ DISALLOW_COPY_AND_ASSIGN(DisplayDelegateBitmap);
+};
+
+} // namespace sky
+
+#endif // SKY_COMPOSITOR_DISPLAY_DELEGATE_BITMAP_H_

Powered by Google App Engine
This is Rietveld 408576698