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

Side by Side Diff: gpu/command_buffer/service/texture_manager.h

Issue 1186393004: gpu: Remove async texture uploads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h"
17 #include "gpu/command_buffer/service/gl_utils.h" 16 #include "gpu/command_buffer/service/gl_utils.h"
18 #include "gpu/command_buffer/service/memory_tracking.h" 17 #include "gpu/command_buffer/service/memory_tracking.h"
19 #include "gpu/gpu_export.h" 18 #include "gpu/gpu_export.h"
20 #include "ui/gfx/geometry/rect.h" 19 #include "ui/gfx/geometry/rect.h"
21 #include "ui/gl/gl_image.h" 20 #include "ui/gl/gl_image.h"
22 21
23 namespace gpu { 22 namespace gpu {
24 namespace gles2 { 23 namespace gles2 {
25 24
26 class GLES2Decoder; 25 class GLES2Decoder;
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 GLint level, 671 GLint level,
673 GLenum internal_format, 672 GLenum internal_format,
674 GLsizei width, 673 GLsizei width,
675 GLsizei height, 674 GLsizei height,
676 GLsizei depth, 675 GLsizei depth,
677 GLint border, 676 GLint border,
678 GLenum format, 677 GLenum format,
679 GLenum type, 678 GLenum type,
680 const gfx::Rect& cleared_rect); 679 const gfx::Rect& cleared_rect);
681 680
682 // Adapter to call above function.
683 void SetLevelInfoFromParams(TextureRef* ref,
684 const gpu::AsyncTexImage2DParams& params) {
685 SetLevelInfo(ref, params.target, params.level, params.internal_format,
686 params.width, params.height, 1 /* depth */, params.border,
687 params.format, params.type,
688 gfx::Rect(params.width, params.height) /* cleared_rect */);
689 }
690
691 Texture* Produce(TextureRef* ref); 681 Texture* Produce(TextureRef* ref);
692 682
693 // Maps an existing texture into the texture manager, at a given client ID. 683 // Maps an existing texture into the texture manager, at a given client ID.
694 TextureRef* Consume(GLuint client_id, Texture* texture); 684 TextureRef* Consume(GLuint client_id, Texture* texture);
695 685
696 // Sets |rect| of mip as cleared. 686 // Sets |rect| of mip as cleared.
697 void SetLevelClearedRect(TextureRef* ref, 687 void SetLevelClearedRect(TextureRef* ref,
698 GLenum target, 688 GLenum target,
699 GLint level, 689 GLint level,
700 const gfx::Rect& cleared_rect); 690 const gfx::Rect& cleared_rect);
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 private: 954 private:
965 DecoderTextureState* texture_state_; 955 DecoderTextureState* texture_state_;
966 base::TimeTicks begin_time_; 956 base::TimeTicks begin_time_;
967 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); 957 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer);
968 }; 958 };
969 959
970 } // namespace gles2 960 } // namespace gles2
971 } // namespace gpu 961 } // namespace gpu
972 962
973 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 963 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/query_manager.cc ('k') | gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698