Lines Matching refs:hr
98 HRESULT hr = S_OK;
102 if (SUCCEEDED(hr)) {
103 hr = CoCreateInstance(
113 if (SUCCEEDED(hr)) {
114 hr = SkIStream::CreateFromSkStream(stream, false, &piStream);
118 if (SUCCEEDED(hr)) {
120 hr = piStream->Seek(liBeginning, STREAM_SEEK_SET, NULL);
125 if (SUCCEEDED(hr)) {
126 hr = piImagingFactory->CreateDecoderFromStream(
137 if (SUCCEEDED(hr)) {
139 hr = piBitmapDecoder->GetContainerFormat(&guidFormat);
140 if (SUCCEEDED(hr)) {
150 if (SUCCEEDED(hr)) {
151 hr = piBitmapDecoder->GetFrame(0, &piBitmapFrameDecode);
156 if (SUCCEEDED(hr)) {
157 hr = piBitmapFrameDecode->QueryInterface(
165 if (SUCCEEDED(hr)) {
166 hr = piBitmapSourceOriginal->GetSize(&width, &height);
170 if (SUCCEEDED(hr)) {
182 if (SUCCEEDED(hr)) {
183 hr = piImagingFactory->CreateFormatConverter(&piFormatConverter);
193 if (SUCCEEDED(hr)) {
194 hr = piFormatConverter->Initialize(
206 if (SUCCEEDED(hr)) {
207 hr = piFormatConverter->QueryInterface(
213 if (SUCCEEDED(hr)) {
217 hr = piBitmapSourceConverted->CopyPixels(
228 return SUCCEEDED(hr);
321 HRESULT hr = S_OK;
325 if (SUCCEEDED(hr)) {
326 hr = CoCreateInstance(
336 if (SUCCEEDED(hr)) {
337 hr = SkWIStream::CreateFromSkWStream(stream, &piStream);
342 if (SUCCEEDED(hr)) {
343 hr = piImagingFactory->CreateEncoder(type, NULL, &piEncoder);
346 if (SUCCEEDED(hr)) {
347 hr = piEncoder->Initialize(piStream.get(), WICBitmapEncoderNoCache);
353 if (SUCCEEDED(hr)) {
354 hr = piEncoder->CreateNewFrame(&piBitmapFrameEncode, &piPropertybag);
357 if (SUCCEEDED(hr)) {
371 // write and set hr iff property exists.
374 if (SUCCEEDED(hr)) {
375 hr = piBitmapFrameEncode->Initialize(piPropertybag.get());
381 if (SUCCEEDED(hr)) {
382 hr = piBitmapFrameEncode->SetSize(width, height);
388 if (SUCCEEDED(hr)) {
389 hr = piBitmapFrameEncode->SetPixelFormat(&formatGUID);
391 if (SUCCEEDED(hr)) {
393 hr = IsEqualGUID(formatGUID, formatDesired) ? S_OK : E_FAIL;
397 if (SUCCEEDED(hr)) {
400 hr = piBitmapFrameEncode->WritePixels(
407 if (SUCCEEDED(hr)) {
408 hr = piBitmapFrameEncode->Commit();
411 if (SUCCEEDED(hr)) {
412 hr = piEncoder->Commit();
415 return SUCCEEDED(hr);