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

Side by Side Diff: chrome/browser/android/vr_shell/textures/ui_texture.h

Issue 2818553002: Rendering Insecure WebVR Warnings into a texture with Skia. (Closed)
Patch Set: Adding comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_
7
8 #include <memory>
9
10 #include "third_party/skia/include/core/SkSurface.h"
11 #include "ui/gfx/geometry/size.h"
12
13 namespace gfx {
14 class Canvas;
15 } // namespace gfx
16
17 namespace vr_shell {
18
19 class UITexture {
20 public:
21 UITexture(int texture_handle, int texture_size);
22 virtual ~UITexture();
23
24 void DrawAndLayout();
25 void Flush();
26 gfx::Size size() const { return size_; }
27
28 protected:
29 virtual void Draw(gfx::Canvas* canvas) = 0;
30 virtual void SetSize() = 0;
31
32 int texture_handle_;
33 int texture_size_;
34 gfx::Size size_;
35 sk_sp<SkSurface> surface_;
36 };
37
38 } // namespace vr_shell
39
40 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698