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

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

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_ASYNC_PIXEL_TRANSFER_DELEGATE_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 25 matching lines...) Expand all
36 GLenum target; 36 GLenum target;
37 GLint level; 37 GLint level;
38 GLint xoffset; 38 GLint xoffset;
39 GLint yoffset; 39 GLint yoffset;
40 GLsizei width; 40 GLsizei width;
41 GLsizei height; 41 GLsizei height;
42 GLenum format; 42 GLenum format;
43 GLenum type; 43 GLenum type;
44 }; 44 };
45 45
46 struct AsyncCompressedTexImage2DParams {
47 GLenum target;
48 GLint level;
49 GLenum internal_format;
50 GLsizei width;
51 GLsizei height;
52 GLint border;
53 GLsizei image_size;
54 };
55
56 struct AsyncCompressedTexSubImage2DParams {
57 GLenum target;
58 GLint level;
59 GLint xoffset;
60 GLint yoffset;
61 GLsizei width;
62 GLsizei height;
63 GLenum format;
64 GLsizei image_size;
65 };
66
46 class AsyncMemoryParams { 67 class AsyncMemoryParams {
47 public: 68 public:
48 AsyncMemoryParams(scoped_refptr<Buffer> buffer, 69 AsyncMemoryParams(scoped_refptr<Buffer> buffer,
49 uint32 data_offset, 70 uint32 data_offset,
50 uint32 data_size); 71 uint32 data_size);
51 ~AsyncMemoryParams(); 72 ~AsyncMemoryParams();
52 73
53 scoped_refptr<Buffer> buffer() const { return buffer_; } 74 scoped_refptr<Buffer> buffer() const { return buffer_; }
54 uint32 data_size() const { return data_size_; } 75 uint32 data_size() const { return data_size_; }
55 uint32 data_offset() const { return data_offset_; } 76 uint32 data_offset() const { return data_offset_; }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // safe/ready to be used. 112 // safe/ready to be used.
92 virtual void AsyncTexImage2D( 113 virtual void AsyncTexImage2D(
93 const AsyncTexImage2DParams& tex_params, 114 const AsyncTexImage2DParams& tex_params,
94 const AsyncMemoryParams& mem_params, 115 const AsyncMemoryParams& mem_params,
95 const base::Closure& bind_callback) = 0; 116 const base::Closure& bind_callback) = 0;
96 117
97 virtual void AsyncTexSubImage2D( 118 virtual void AsyncTexSubImage2D(
98 const AsyncTexSubImage2DParams& tex_params, 119 const AsyncTexSubImage2DParams& tex_params,
99 const AsyncMemoryParams& mem_params) = 0; 120 const AsyncMemoryParams& mem_params) = 0;
100 121
122 virtual void AsyncCompressedTexImage2D(
123 const AsyncCompressedTexImage2DParams& tex_params,
124 const AsyncMemoryParams& mem_params,
125 const base::Closure& bind_callback) = 0;
126
127 virtual void AsyncCompressedTexSubImage2D(
128 const AsyncCompressedTexSubImage2DParams& tex_params,
129 const AsyncMemoryParams& mem_params) = 0;
130
101 // Returns true if there is a transfer in progress. 131 // Returns true if there is a transfer in progress.
102 virtual bool TransferIsInProgress() = 0; 132 virtual bool TransferIsInProgress() = 0;
103 133
104 // Block until the specified transfer completes. 134 // Block until the specified transfer completes.
105 virtual void WaitForTransferCompletion() = 0; 135 virtual void WaitForTransferCompletion() = 0;
106 136
107 protected: 137 protected:
108 AsyncPixelTransferDelegate(); 138 AsyncPixelTransferDelegate();
109 139
110 private: 140 private:
111 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegate); 141 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegate);
112 }; 142 };
113 143
114 } // namespace gpu 144 } // namespace gpu
115 145
116 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_H_ 146 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_H_
117 147
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.cc ('k') | gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698