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

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

Issue 648293006: cc: turn on distance field text on animated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 }; 323 };
324 324
325 class CC_EXPORT ScopedWriteLockGr { 325 class CC_EXPORT ScopedWriteLockGr {
326 public: 326 public:
327 ScopedWriteLockGr(ResourceProvider* resource_provider, 327 ScopedWriteLockGr(ResourceProvider* resource_provider,
328 ResourceProvider::ResourceId resource_id); 328 ResourceProvider::ResourceId resource_id);
329 ~ScopedWriteLockGr(); 329 ~ScopedWriteLockGr();
330 330
331 SkSurface* sk_surface() { return sk_surface_; } 331 SkSurface* sk_surface() { return sk_surface_; }
332 332
333 void SetUseDistanceFieldText(bool use_distance_field_text);
reveman 2014/10/15 17:34:09 How about we change sk_surface() function above to
334
333 private: 335 private:
334 ResourceProvider* resource_provider_; 336 ResourceProvider* resource_provider_;
335 ResourceProvider::ResourceId resource_id_; 337 ResourceProvider::ResourceId resource_id_;
336 SkSurface* sk_surface_; 338 SkSurface* sk_surface_;
337 339
338 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGr); 340 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGr);
339 }; 341 };
340 342
341 class Fence : public base::RefCounted<Fence> { 343 class Fence : public base::RefCounted<Fence> {
342 public: 344 public:
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 Resource* GetResource(ResourceId id); 498 Resource* GetResource(ResourceId id);
497 const Resource* LockForRead(ResourceId id); 499 const Resource* LockForRead(ResourceId id);
498 void UnlockForRead(ResourceId id); 500 void UnlockForRead(ResourceId id);
499 const Resource* LockForWrite(ResourceId id); 501 const Resource* LockForWrite(ResourceId id);
500 void UnlockForWrite(ResourceId id); 502 void UnlockForWrite(ResourceId id);
501 const Resource* LockForWriteToGpuMemoryBuffer(ResourceId id); 503 const Resource* LockForWriteToGpuMemoryBuffer(ResourceId id);
502 void UnlockForWriteToGpuMemoryBuffer(ResourceId id); 504 void UnlockForWriteToGpuMemoryBuffer(ResourceId id);
503 const Resource* LockForWriteToSkSurface(ResourceId id); 505 const Resource* LockForWriteToSkSurface(ResourceId id);
504 void UnlockForWriteToSkSurface(ResourceId id); 506 void UnlockForWriteToSkSurface(ResourceId id);
505 507
508 SkSurface* ResourceProvider::CreateSkSurface(ResourceId id,
reveman 2014/10/15 17:34:09 Not need for ResourceProvider:: prefix. Though, I
509 bool use_distance_field_text);
510
506 static void PopulateSkBitmapWithResource(SkBitmap* sk_bitmap, 511 static void PopulateSkBitmapWithResource(SkBitmap* sk_bitmap,
507 const Resource* resource); 512 const Resource* resource);
508 513
509 void TransferResource(gpu::gles2::GLES2Interface* gl, 514 void TransferResource(gpu::gles2::GLES2Interface* gl,
510 ResourceId id, 515 ResourceId id,
511 TransferableResource* resource); 516 TransferableResource* resource);
512 enum DeleteStyle { 517 enum DeleteStyle {
513 Normal, 518 Normal,
514 ForShutdown, 519 ForShutdown,
515 }; 520 };
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 return format_gl_data_format[format]; 617 return format_gl_data_format[format];
613 } 618 }
614 619
615 inline GLenum GLInternalFormat(ResourceFormat format) { 620 inline GLenum GLInternalFormat(ResourceFormat format) {
616 return GLDataFormat(format); 621 return GLDataFormat(format);
617 } 622 }
618 623
619 } // namespace cc 624 } // namespace cc
620 625
621 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 626 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698