| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
R=sky
BUG=163454
Depends on: https://codereview.chromium.org/11418217/
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11299262
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171107 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
actually extend
SkCanvas in any way, other than provide a host of constructors (and delayed constructors
in the form of 'initialize' methods).
These late initializers are a problem, as SkCanvas is deprecating its setDevice() call,
moving to model where the backingstore/device for the canvas must be created before the
canvas is created. This is necessary to allow skia to continue to extend SkCanvas for
its backends (e.g. GPU, PDF, Picture, Pipe, etc.).
The practical change in this CL is to make PlatformCanvas just a typedef for SkCanvas,
and change the call-sites that want to call initialize() to instead create the canvas
using one of the provided Factory functions (e.g. CreatePlatformCanvas). The modifier
Platform is maintained, to document that this canvas may be backed by platform-specific
pixels (e.g. allocated by GDI or cairo).
Review URL: https://codereview.chromium.org/11138024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167669 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to Rect/Point.
Covered by existing unit tests.
R=sky
BUG=160158
Review URL: https://chromiumcodereview.appspot.com/11377068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167077 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously Point served two purposes, to be a position in 2d space, and also
an offset from the origin. This introduces a Vector2d class to represent an
offset, allowing typesafety checks for geometric operations.
The following are now the case:
Point +/- Vector = Point
- A point plus/minus an offset gives you a point at a position offset by the
vector.
Vector +/- Vector = Vector
- Two offsets can be added together to make a new offset.
Point - Point = Vector
- Subtracting one point from another gives you the offset between the two
points.
We add some new methods to perform these operations:
Rect::OffsetFromOrigin() gives the offset between the position of the rect
and the origin.
Point::OffsetFromOrigin() gives the offset between the point and the origin.
PointAtOffsetFromOrigin(Vector2d) converts a Vector2d to a Point at the given
offset away from the origin.
Rect::Offset(), Point::Add(), and Point::Subtract() now receive a Vector2d
instead of a point.
BUG=147395
R=sky
Review URL: https://codereview.chromium.org/11269022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165198 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
It is more appropriate for Transform class to belong with its fellow
geometry classes in the gfx namespace.
Review URL: https://chromiumcodereview.appspot.com/11145005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161809 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When scaling an integer point or size, return a floating point
result. Implicitly flooring hides design problems and bugs. Add
conversion functions to floor or ceil a SizeF or PointF
into an integer format again.
All existing behaviour has been preserved by replacing uses of
foo.Scale() with ToFlooredFoo(foo.Scale()).
R=sky
BUG=147395
Review URL: https://chromiumcodereview.appspot.com/11081007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160970 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specify an alpha directly, rather than forcing them to bracket the call with
SaveLayerAlpha(alpha)
DrawBitmapInt()
Restore()
Should be 2x faster or better.
Review URL: https://codereview.chromium.org/11046020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159948 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Bug=None
Test=Compiles on Mac and CrOS
R=oshima,sky
TBR=sadrul,sail
Review URL: https://chromiumcodereview.appspot.com/10701063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148123 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reverting because composite_unittests were failing on Linux (aura) and Linux ChromeOS Tests bots.
Bug=None
Test=Compiles on Mac and CrOS
R=oshima,sky
TBR=sadrul,sail
Review URL: https://chromiumcodereview.appspot.com/10701063
TBR=pkotwicz@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10790128
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147936 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Bug=None
Test=Compiles on Mac and CrOS
R=oshima,sky
TBR=sadrul,sail
Review URL: https://chromiumcodereview.appspot.com/10701063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147915 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added DrawImageInPath to Canvas API.
BUG=None
TEST=Manual
Test Steps:
Change the resize code in tray_user to properly resize based on scale factor (See TODO)
Run with --force-device-scale-factor=2 --load-2x-resources
Ensure that tray user avatars are not blurry
Review URL: https://chromiumcodereview.appspot.com/10720003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145176 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows ExtractBitmap() to return an ImageSkiaRep.
This simplifies code around using intermediate bitmaps a lot.
BUG=131475
TEST=Compiles
R=oshima,sky
TBR=sadrul
Review URL: https://chromiumcodereview.appspot.com/10562027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144489 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The object represents an SkBitmap and the scale factor that it is painted at.
The CL also changes the ImageSkia API to use ui::ScaleFactor instead of floats.
In Chromium, having this object is useful because it makes extracting an SkBitmap from an ImageSkia object and packing it back into an ImageSkia object easier.
In particular, this makes:
float scale_factor;
SkBitmap bitmap = input_image->GetBitmapForScale(1.0f, &scale_factor);
// do some work with the bitmap
gfx::ImageSkia output_image(bitmap, scale_factor);
into
gfx::ImageSkiaRep image_rep = input_image->GetRepresentation(ui::SCALE_FACTOR_100P);
// do some work with the image_rep
gfx::ImageSkia output_image(image_rep);
R=sky
TBR=sadrul for chrome/browser/chromeos/status
Review URL: https://chromiumcodereview.appspot.com/10448070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143940 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Bug=None
Test=Compiles
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=140877
Review URL: https://chromiumcodereview.appspot.com/10512021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141002 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug=None
Test=Compiles
Review URL: https://chromiumcodereview.appspot.com/10512021
TBR=pkotwicz@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10546037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140882 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Bug=None
Test=Compiles
Review URL: https://chromiumcodereview.appspot.com/10512021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140877 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow-up clean up for http://crrev.com/139162.
BUG=none.
TEST=none.
Review URL: https://chromiumcodereview.appspot.com/10453057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139412 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
TBR=pkotwicz@chromium.org,
BUG=none
TEST=heapchecker bot will cycle green
Review URL: https://chromiumcodereview.appspot.com/10441058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139199 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and TileImageInt. Made these two files use the version inside of Canvas.
Also fixed hidden bug in ::DrawTiledImage where src_x and src_y translates are applied after the tile scale instead of before.
This bug is hidden as neither native_theme_base/android called DrawTiledImage with src_x/src_y != 0.
Bug=124566
Test=Webkit fast/* layout tests produce no image diffs
Review URL: https://chromiumcodereview.appspot.com/10452035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139149 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=128951
TEST=Manual
Review URL: https://chromiumcodereview.appspot.com/10417041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138528 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from SkBitmap to ImageSkia easier.
Notable changes:
- ImageSkia can be cheaply copied
- Added extractSubset, will remove after SkBitmaps have been converted to ImageSkia
- Modified API to look more like SkBitmap
Review URL: https://chromiumcodereview.appspot.com/10245003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137520 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to make swapping from SkBitmap to ImageSkia easier.
Notable changes:
- ImageSkia can be cheaply copied
- Added extractSubset, will remove after SkBitmaps have been converted to ImageSkia
- Modified API to look more like SkBitmap
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=136304
Review URL: https://chromiumcodereview.appspot.com/10245003
TBR=pkotwicz@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10389132
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136995 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from SkBitmap to ImageSkia easier.
Notable changes:
- ImageSkia can be cheaply copied
- Added extractSubset, will remove after SkBitmaps have been converted to ImageSkia
- Modified API to look more like SkBitmap
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=136304
Review URL: https://chromiumcodereview.appspot.com/10245003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136332 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to make swapping from SkBitmap to ImageSkia easier.
Notable changes:
- ImageSkia can be cheaply copied
- Added extractSubset, will remove after SkBitmaps have been converted to ImageSkia
- Modified API to look more like SkBitmap
Review URL: https://chromiumcodereview.appspot.com/10245003
TBR=pkotwicz@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10383110
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136313 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from SkBitmap to ImageSkia easier.
Notable changes:
- ImageSkia can be cheaply copied
- Added extractSubset, will remove after SkBitmaps have been converted to ImageSkia
- Modified API to look more like SkBitmap
Review URL: https://chromiumcodereview.appspot.com/10245003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136304 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ImageSkia which contains vector of SkBitmaps. Previously this functionality was within ImageRepSkia. ImageSkia exposes this.
Move gfx::Image::GetSkBitmapAtIndex and gfx::Image::GetNumSkBitmaps to ImageSkia
BUG=122992
TEST=None
Review URL: http://codereview.chromium.org/10086023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133607 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add a DrawStringWithShadows that draws text with shadows to canvas skia
and RenderText;
- Use DrawStringWithShadows in DropShadowLabel for better and faster text
shadows;
BUG=121694
TEST=Verify fix for issue 121694.
Review URL: http://codereview.chromium.org/10008027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131696 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Bug=114665
Test=Compiles
Review URL: http://codereview.chromium.org/9949067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131474 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=100898
R=asvitkine@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9838089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128782 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=100898
R=pkasting@chromium.org
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9718014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127376 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=116572
R=asvitkine@chromium.org
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9719018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127369 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=116572
R=asvitkine@chromium.org
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9704096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127307 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
The final goal is to merge these two classes into a single gfx::Canvas class.
BUG=116572
R=ben@chromium.org,asvitkine@chromium.org
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9562038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125735 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=100898
R=pkasting@chromium.org
Review URL: http://codereview.chromium.org/8390037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107483 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8122013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104146 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=71063
TEST=compiled
Review URL: http://codereview.chromium.org/6312156
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
|
|
To reduce the size of this change I've left stub header files in src/gfx/. Once all includes have been updated I'll delete the stub files.
BUG=71063
TEST=Still doing test builds.
Review URL: http://codereview.chromium.org/6246027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73530 0039d316-1c4b-4281-b951-d872f2087c98
|