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

Side by Side Diff: chrome/browser/android/vr_shell/vr_controller_model.h

Issue 2891243002: VR: Loading DD controller model after GL is initialized (Closed)
Patch Set: doing texture patching on background task Created 3 years, 7 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_MODEL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_MODEL_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_MODEL_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_MODEL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "chrome/browser/android/vr_shell/gltf_asset.h" 10 #include "chrome/browser/android/vr_shell/gltf_asset.h"
(...skipping 21 matching lines...) Expand all
32 32
33 const GLvoid* ElementsBuffer() const; 33 const GLvoid* ElementsBuffer() const;
34 GLsizeiptr ElementsBufferSize() const; 34 GLsizeiptr ElementsBufferSize() const;
35 const GLvoid* IndicesBuffer() const; 35 const GLvoid* IndicesBuffer() const;
36 GLenum DrawMode() const; 36 GLenum DrawMode() const;
37 GLsizeiptr IndicesBufferSize() const; 37 GLsizeiptr IndicesBufferSize() const;
38 const gltf::Accessor* IndicesAccessor() const; 38 const gltf::Accessor* IndicesAccessor() const;
39 const gltf::Accessor* PositionAccessor() const; 39 const gltf::Accessor* PositionAccessor() const;
40 const gltf::Accessor* TextureCoordinateAccessor() const; 40 const gltf::Accessor* TextureCoordinateAccessor() const;
41 void SetBaseTexture(sk_sp<SkImage> image); 41 void SetBaseTexture(sk_sp<SkImage> image);
42 void SetTexturePatch(int state, sk_sp<SkImage> image); 42 void SetTexture(int state, sk_sp<SkImage> patch);
43 sk_sp<SkImage> GetTexture(int state) const; 43 sk_sp<SkImage> GetTexture(int state) const;
44 44
45 static std::unique_ptr<VrControllerModel> LoadFromComponent(); 45 static std::unique_ptr<VrControllerModel> LoadFromResources();
46 46
47 private: 47 private:
48 std::unique_ptr<gltf::Asset> gltf_asset_; 48 std::unique_ptr<gltf::Asset> gltf_asset_;
49 sk_sp<SkImage> base_texture_; 49 sk_sp<SkImage> base_texture_;
50 sk_sp<SkImage> patches_[STATE_COUNT]; 50 sk_sp<SkImage> textures_[STATE_COUNT];
51 std::vector<std::unique_ptr<gltf::Buffer>> buffers_; 51 std::vector<std::unique_ptr<gltf::Buffer>> buffers_;
52 52
53 const char* Buffer() const; 53 const char* Buffer() const;
54 const gltf::Accessor* Accessor(const std::string& key) const; 54 const gltf::Accessor* Accessor(const std::string& key) const;
55 }; 55 };
56 56
57 } // namespace vr_shell 57 } // namespace vr_shell
58 58
59 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_MODEL_H_ 59 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698