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

Side by Side Diff: cc/resources/resource_provider.h

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix raster-on-demand codepath Created 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_RESOURCES_RESOURCE_PROVIDER_H_ 5 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_
6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ 6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 318 }
319 Fence* GetReadLockFence() { return current_read_lock_fence_.get(); } 319 Fence* GetReadLockFence() { return current_read_lock_fence_.get(); }
320 320
321 // Enable read lock fences for a specific resource. 321 // Enable read lock fences for a specific resource.
322 void EnableReadLockFences(ResourceProvider::ResourceId id, bool enable); 322 void EnableReadLockFences(ResourceProvider::ResourceId id, bool enable);
323 323
324 // Indicates if we can currently lock this resource for write. 324 // Indicates if we can currently lock this resource for write.
325 bool CanLockForWrite(ResourceId id); 325 bool CanLockForWrite(ResourceId id);
326 326
327 static GLint GetActiveTextureUnit(WebKit::WebGraphicsContext3D* context); 327 static GLint GetActiveTextureUnit(WebKit::WebGraphicsContext3D* context);
328 bool use_16_bit_textures() { return use_16_bit_textures_; }
328 329
329 private: 330 private:
330 struct Resource { 331 struct Resource {
331 Resource(); 332 Resource();
332 ~Resource(); 333 ~Resource();
333 Resource(unsigned texture_id, 334 Resource(unsigned texture_id,
334 gfx::Size size, 335 gfx::Size size,
335 GLenum format, 336 GLenum format,
336 GLenum filter, 337 GLenum filter,
337 GLenum texture_pool, 338 GLenum texture_pool,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 bool use_texture_usage_hint_; 433 bool use_texture_usage_hint_;
433 bool use_shallow_flush_; 434 bool use_shallow_flush_;
434 scoped_ptr<TextureUploader> texture_uploader_; 435 scoped_ptr<TextureUploader> texture_uploader_;
435 int max_texture_size_; 436 int max_texture_size_;
436 GLenum best_texture_format_; 437 GLenum best_texture_format_;
437 438
438 base::ThreadChecker thread_checker_; 439 base::ThreadChecker thread_checker_;
439 440
440 scoped_refptr<Fence> current_read_lock_fence_; 441 scoped_refptr<Fence> current_read_lock_fence_;
441 442
443 bool use_16_bit_textures_;
444
442 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); 445 DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
443 }; 446 };
444 447
445 } // namespace cc 448 } // namespace cc
446 449
447 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 450 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698