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

Unified Diff: remoting/client/display/fake_canvas.h

Issue 2591363002: Adding drawable to CRD andorid and iOS gl rendering pipeline. (Closed)
Patch Set: More like GetZIndex. Created 3 years, 11 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: remoting/client/display/fake_canvas.h
diff --git a/remoting/client/display/fake_canvas.h b/remoting/client/display/fake_canvas.h
new file mode 100644
index 0000000000000000000000000000000000000000..036091fb0d2a1f4b06e549fb262e757f540fe330
--- /dev/null
+++ b/remoting/client/display/fake_canvas.h
@@ -0,0 +1,43 @@
+// Copyright 2016 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 REMOTING_CLIENT_DISPLAY_FAKE_CANVAS_H_
+#define REMOTING_CLIENT_DISPLAY_FAKE_CANVAS_H_
+
+#include <array>
+
+#include "base/macros.h"
+#include "base/threading/thread_checker.h"
+#include "remoting/client/display/gl_canvas.h"
+#include "remoting/client/display/sys_opengl.h"
+
+namespace remoting {
+
+class FakeCanvas : public Canvas {
+ public:
+ FakeCanvas();
+ ~FakeCanvas() override;
+
+ // Drawable implementation.
+ void Clear() override;
+ void SetTransformationMatrix(const std::array<float, 9>& matrix) override;
+ void SetViewSize(int width, int height) override;
+ void DrawTexture(int texture_id,
+ int texture_handle,
+ int vertex_buffer,
+ float alpha_multiplier) override;
+ int GetVersion() const override;
+ int GetMaxTextureSize() const override;
+ base::WeakPtr<Canvas> GetWeakPtr() override;
+
+ private:
+ base::ThreadChecker thread_checker_;
+ base::WeakPtrFactory<Canvas> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeCanvas);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_CLIENT_DISPLAY_FAKE_CANVAS_H_

Powered by Google App Engine
This is Rietveld 408576698